* @param {string} value * @param {string} [type] * @returns {Token | void}
(value, type)
| 338 | * @returns {Token | void} |
| 339 | */ |
| 340 | function matchToken(value, type) { |
| 341 | if (follows.indexOf(value) !== -1) { |
| 342 | return; // disallowed token here |
| 343 | } |
| 344 | var type = type || "IDENTIFIER"; |
| 345 | if (currentToken() && currentToken().value === value && currentToken().type === type) { |
| 346 | return consumeToken(); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | /** |
| 351 | * @returns {Token} |
no test coverage detected