()
| 924 | } |
| 925 | |
| 926 | public Expression callExpression() { |
| 927 | Expression expr = memberExpression(); |
| 928 | |
| 929 | loop: |
| 930 | while (true) { |
| 931 | switch (la()) { |
| 932 | case DOT: |
| 933 | consume(DOT); |
| 934 | String identifier = consume().getText(); |
| 935 | expr = factory.dotOperator(expr, identifier); |
| 936 | break; |
| 937 | case LEFT_BRACKET: |
| 938 | consume(LEFT_BRACKET); |
| 939 | expr = factory.bracketOperator(expr, expression()); |
| 940 | consume(RIGHT_BRACKET); |
| 941 | break; |
| 942 | case LEFT_PAREN: |
| 943 | List<Expression> args = arguments(); |
| 944 | expr = factory.functionCall(expr, args); |
| 945 | break; |
| 946 | default: |
| 947 | break loop; |
| 948 | } |
| 949 | } |
| 950 | |
| 951 | return expr; |
| 952 | } |
| 953 | |
| 954 | public Expression newExpression() { |
| 955 | consume(NEW); |
no test coverage detected