(state ParserState)
| 362 | } |
| 363 | |
| 364 | func (p *Parser) rewind(state ParserState) { |
| 365 | p.scanner.Rewind(state.scannerState) |
| 366 | p.token = p.scanner.Token() |
| 367 | p.contextFlags = state.contextFlags |
| 368 | p.diagnostics = p.diagnostics[0:state.diagnosticsLen] |
| 369 | p.jsDiagnostics = p.jsDiagnostics[0:state.jsDiagnosticsLen] |
| 370 | p.jsdocInfos = p.jsdocInfos[0:state.jsdocInfosLen] |
| 371 | p.reparsedClones = p.reparsedClones[0:state.reparsedClonesLen] |
| 372 | p.statementHasAwaitIdentifier = state.statementHasAwaitIdentifier |
| 373 | p.hasParseError = state.hasParseError |
| 374 | } |
| 375 | |
| 376 | func (p *Parser) lookAhead(callback func(p *Parser) bool) bool { |
| 377 | state := p.mark() |
no test coverage detected