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

Method skipWhitespace

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

Source from the content-addressed store, hash-verified

417}
418
419func (p *Parser) skipWhitespace() {
420 if p.token == ast.KindWhitespaceTrivia || p.token == ast.KindNewLineTrivia {
421 if p.lookAhead((*Parser).isNextNonwhitespaceTokenEndOfFile) {
422 return
423 // Don't skip whitespace prior to EoF (or end of comment) - that shouldn't be included in any node's range
424 }
425 }
426 for p.token == ast.KindWhitespaceTrivia || p.token == ast.KindNewLineTrivia {
427 p.nextTokenJSDoc()
428 }
429}
430
431func (p *Parser) skipWhitespaceOrAsterisk() string {
432 if p.token == ast.KindWhitespaceTrivia || p.token == ast.KindNewLineTrivia {

Calls 2

lookAheadMethod · 0.95
nextTokenJSDocMethod · 0.95

Tested by

no test coverage detected