()
| 661 | return r |
| 662 | } |
| 663 | function parse_lambda(){ |
| 664 | var n=input.peek() |
| 665 | var r={ |
| 666 | type:"Lambda", |
| 667 | value:n.value, |
| 668 | poi:{line:n.poi.line,start:n.poi.start}, |
| 669 | body:[] |
| 670 | } |
| 671 | input.next() |
| 672 | var argument={ |
| 673 | type: "Arguments", |
| 674 | body: [], |
| 675 | poi:{line:input.peek().poi.line,start:input.peek().poi.start}, |
| 676 | value:'' |
| 677 | } |
| 678 | while(!is_sp(':')){ |
| 679 | let arg=input.next() |
| 680 | argument.body.push(arg) |
| 681 | argument.value+=arg.value |
| 682 | } |
| 683 | r.arguments=argument |
| 684 | while(!is_sp(',')&&!is_punc()&&input.peek().type!='t'){ |
| 685 | let b=input.next() |
| 686 | r.body.push(b) |
| 687 | } |
| 688 | |
| 689 | // console.log('lambda',r) |
| 690 | return r |
| 691 | } |
| 692 | function parse_expression(iscls){ |
| 693 | if(is_id())return parse_id(iscls); |
| 694 | if(is_punc('['))return parse_list() |
no test coverage detected