(keyword, contextual)
| 5190 | // If not, an exception will be thrown. |
| 5191 | |
| 5192 | function expectKeyword(keyword, contextual) { |
| 5193 | var token = lex(); |
| 5194 | if (token.type !== (contextual ? Token.Identifier : Token.Keyword) || |
| 5195 | token.value !== keyword) { |
| 5196 | throwUnexpected(token); |
| 5197 | } |
| 5198 | } |
| 5199 | |
| 5200 | // Expect the next token to match the specified contextual keyword. |
| 5201 | // If not, an exception will be thrown. |
no test coverage detected