()
| 552 | } |
| 553 | } |
| 554 | function parse_new(){ |
| 555 | var n=input.next(); |
| 556 | if(is_id()){ |
| 557 | var r={ |
| 558 | type:"NewExpression", |
| 559 | value:input.peek().value, |
| 560 | poi:{line:n.poi.line,start:n.poi.start}, |
| 561 | } |
| 562 | var nn=input.next() |
| 563 | if(is_punc('(')){ |
| 564 | r.body=[parse_arguments()] |
| 565 | return r; |
| 566 | }else if(input.peek().value=='<'){ |
| 567 | r.T=input.next() |
| 568 | return r; |
| 569 | }else if(is_sp('.')){ |
| 570 | return parse_new() |
| 571 | }else if(is_punc('{')){//c# |
| 572 | r.block=parse_block() |
| 573 | return r |
| 574 | }else{ |
| 575 | // console.warn("parse new",input.peek()); |
| 576 | return nn; |
| 577 | } |
| 578 | }else{ |
| 579 | console.warn("parse new",input.peek()); |
| 580 | return n |
| 581 | } |
| 582 | } |
| 583 | function parse_expression(){ |
| 584 | if (is_punc("("))return parse_arguments(); |
| 585 | else if (is_punc("{")) return parse_block(); |
no test coverage detected