()
| 322 | } |
| 323 | |
| 324 | nextToken(): RawToken { |
| 325 | const token = this.lookahead; |
| 326 | |
| 327 | this.lastMarker.index = this.scanner.index; |
| 328 | this.lastMarker.line = this.scanner.lineNumber; |
| 329 | this.lastMarker.column = this.scanner.index - this.scanner.lineStart; |
| 330 | |
| 331 | this.collectComments(); |
| 332 | |
| 333 | if (this.scanner.index !== this.startMarker.index) { |
| 334 | this.startMarker.index = this.scanner.index; |
| 335 | this.startMarker.line = this.scanner.lineNumber; |
| 336 | this.startMarker.column = this.scanner.index - this.scanner.lineStart; |
| 337 | } |
| 338 | |
| 339 | const next = this.scanner.lex(); |
| 340 | this.hasLineTerminator = (token.lineNumber !== next.lineNumber); |
| 341 | |
| 342 | if (next && this.context.strict && next.type === Token.Identifier) { |
| 343 | if (this.scanner.isStrictModeReservedWord(next.value as string)) { |
| 344 | next.type = Token.Keyword; |
| 345 | } |
| 346 | } |
| 347 | this.lookahead = next; |
| 348 | |
| 349 | if (this.config.tokens && next.type !== Token.EOF) { |
| 350 | this.tokens.push(this.convertToken(next)); |
| 351 | } |
| 352 | |
| 353 | return token; |
| 354 | } |
| 355 | |
| 356 | nextRegexToken(): RawToken { |
| 357 | this.collectComments(); |
no test coverage detected