()
| 144172 | "if": 1 |
| 144173 | }; |
| 144174 | function parsePrimaryExpression() { |
| 144175 | var type, token, expr; |
| 144176 | if (match("(")) return parseGroupExpression(); |
| 144177 | if (match("[")) return parseArrayInitialiser(); |
| 144178 | if (match("{")) return parseObjectInitialiser(); |
| 144179 | type = lookahead.type; |
| 144180 | index = lookahead.start; |
| 144181 | if (type === TokenIdentifier || legalKeywords[lookahead.value]) expr = finishIdentifier(lex().value); |
| 144182 | else if (type === TokenStringLiteral || type === TokenNumericLiteral) { |
| 144183 | if (lookahead.octal) throwError(lookahead, MessageStrictOctalLiteral); |
| 144184 | expr = finishLiteral(lex()); |
| 144185 | } else if (type === TokenKeyword) throw new Error(DISABLED); |
| 144186 | else if (type === TokenBooleanLiteral) { |
| 144187 | token = lex(); |
| 144188 | token.value = token.value === "true"; |
| 144189 | expr = finishLiteral(token); |
| 144190 | } else if (type === TokenNullLiteral) { |
| 144191 | token = lex(); |
| 144192 | token.value = null; |
| 144193 | expr = finishLiteral(token); |
| 144194 | } else if (match("/") || match("/=")) { |
| 144195 | expr = finishLiteral(scanRegExp()); |
| 144196 | peek(); |
| 144197 | } else throwUnexpected(lex()); |
| 144198 | return expr; |
| 144199 | } // 11.2 Left-Hand-Side Expressions |
| 144200 | function parseArguments() { |
| 144201 | const args = []; |
| 144202 | expect("("); |
no test coverage detected