func (p *Parser) nextToken() lex.ScanToken {
	for {
		tok := p.lex.Next()
		if tok == lex.BuildComment {
			if p.sawCode {
				p.errorf("misplaced //go:build comment")
			}
			continue
		}
		if tok != '\n' {
			p.sawCode = true
		}
		if tok == '#' {
			// A leftover wisp of a #include/#define/etc,
			// to let us know that p.sawCode should be true now.
			// Otherwise ignored.
			continue
		}
		return tok
	}
}
// nextToken returns the next non-build-comment token from the lexer.
// It reports misplaced //go:build comments but otherwise discards them.
nextToken returns the next non-build-comment token from the lexer.
It reports misplaced //go:build comments but otherwise discards them.
// nextToken returns the next non - build - comment token from the lexer . // It reports misplaced // go : build comments but otherwise discards them .
func (p *Parser) nextToken() lex.ScanToken {
	for {
		tok := p.lex.Next()
		if tok == lex.BuildComment {
			if p.sawCode {
				p.errorf("misplaced //go:build comment")
			}
			continue
		}
		if tok != '\n' {
			p.sawCode = true
		}
		if tok == '#' {
			continue
		}
		return tok
	}
}
func ( p * Parser ) nextToken ( ) lex . ScanToken { for { tok := p . lex . Next ( ) if tok == lex . BuildComment { if p . sawCode { p . errorf ( " " ) } continue } if tok != '\n' { p . sawCode = true } if tok == '#' { continue } return tok } }
nextToken returns the next non-build-comment token from the lexer.
nextToken returns the next non - build - comment token from the lexer .
// A leftover wisp of a #include/#define/etc, // to let us know that p.sawCode should be true now. // Otherwise ignored.