MCPcopy Create free account
hub / github.com/microsoft/typescript-go / nextToken

Method nextToken

internal/parser/parser.go:383–391  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

381}
382
383func (p *Parser) nextToken() ast.Kind {
384 // if the keyword had an escape
385 if ast.IsKeyword(p.token) && (p.scanner.HasUnicodeEscape() || p.scanner.HasExtendedUnicodeEscape()) {
386 // issue a parse error for the escape
387 p.parseErrorAtCurrentToken(diagnostics.Keywords_cannot_contain_escape_characters)
388 }
389 p.token = p.scanner.Scan()
390 return p.token
391}
392
393func (p *Parser) nextTokenWithoutCheck() ast.Kind {
394 p.token = p.scanner.Scan()

Calls 5

IsKeywordFunction · 0.92
HasUnicodeEscapeMethod · 0.80
ScanMethod · 0.80

Tested by

no test coverage detected