()
| 129033 | }; |
| 129034 | |
| 129035 | function parsePrimaryExpression() { |
| 129036 | var type, token, expr; |
| 129037 | |
| 129038 | if (match('(')) { |
| 129039 | return parseGroupExpression(); |
| 129040 | } |
| 129041 | |
| 129042 | if (match('[')) { |
| 129043 | return parseArrayInitialiser(); |
| 129044 | } |
| 129045 | |
| 129046 | if (match('{')) { |
| 129047 | return parseObjectInitialiser(); |
| 129048 | } |
| 129049 | |
| 129050 | type = lookahead.type; |
| 129051 | index = lookahead.start; |
| 129052 | |
| 129053 | if (type === TokenIdentifier || legalKeywords[lookahead.value]) { |
| 129054 | expr = finishIdentifier(lex().value); |
| 129055 | } else if (type === TokenStringLiteral || type === TokenNumericLiteral) { |
| 129056 | if (lookahead.octal) { |
| 129057 | throwError(lookahead, MessageStrictOctalLiteral); |
| 129058 | } |
| 129059 | |
| 129060 | expr = finishLiteral(lex()); |
| 129061 | } else if (type === TokenKeyword) { |
| 129062 | throw new Error(DISABLED); |
| 129063 | } else if (type === TokenBooleanLiteral) { |
| 129064 | token = lex(); |
| 129065 | token.value = token.value === 'true'; |
| 129066 | expr = finishLiteral(token); |
| 129067 | } else if (type === TokenNullLiteral) { |
| 129068 | token = lex(); |
| 129069 | token.value = null; |
| 129070 | expr = finishLiteral(token); |
| 129071 | } else if (match('/') || match('/=')) { |
| 129072 | expr = finishLiteral(scanRegExp()); |
| 129073 | peek(); |
| 129074 | } else { |
| 129075 | throwUnexpected(lex()); |
| 129076 | } |
| 129077 | |
| 129078 | return expr; |
| 129079 | } // 11.2 Left-Hand-Side Expressions |
| 129080 | |
| 129081 | |
| 129082 | function parseArguments() { |
no test coverage detected