(token)
| 144084 | throw error; |
| 144085 | } // Throw an exception because of the token. |
| 144086 | function throwUnexpected(token) { |
| 144087 | if (token.type === TokenEOF) throwError(token, MessageUnexpectedEOS); |
| 144088 | if (token.type === TokenNumericLiteral) throwError(token, MessageUnexpectedNumber); |
| 144089 | if (token.type === TokenStringLiteral) throwError(token, MessageUnexpectedString); |
| 144090 | if (token.type === TokenIdentifier) throwError(token, MessageUnexpectedIdentifier); |
| 144091 | if (token.type === TokenKeyword) throwError(token, MessageUnexpectedReserved); |
| 144092 | // BooleanLiteral, NullLiteral, or Punctuator. |
| 144093 | throwError(token, MessageUnexpectedToken, token.value); |
| 144094 | } // Expect the next token to match the specified punctuator. |
| 144095 | // If not, an exception will be thrown. |
| 144096 | function expect(value) { |
| 144097 | const token = lex(); |
no test coverage detected