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

Method isNextNonwhitespaceTokenEndOfFile

internal/parser/jsdoc.go:406–417  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

404}
405
406func (p *Parser) isNextNonwhitespaceTokenEndOfFile() bool {
407 // We must use infinite lookahead, as there could be any number of newlines :(
408 for {
409 p.nextTokenJSDoc()
410 if p.token == ast.KindEndOfFile {
411 return true
412 }
413 if !(p.token == ast.KindWhitespaceTrivia || p.token == ast.KindNewLineTrivia) {
414 return false
415 }
416 }
417}
418
419func (p *Parser) skipWhitespace() {
420 if p.token == ast.KindWhitespaceTrivia || p.token == ast.KindNewLineTrivia {

Callers

nothing calls this directly

Calls 1

nextTokenJSDocMethod · 0.95

Tested by

no test coverage detected