MCPcopy Create free account
hub / github.com/dolthub/doltgresql / Next

Method Next

testing/generation/utils/token_reader.go:40–46  ·  view source on GitHub ↗

Next returns the next token while advancing the reader. Returns false if there are no more tokens.

()

Source from the content-addressed store, hash-verified

38
39// Next returns the next token while advancing the reader. Returns false if there are no more tokens.
40func (reader *TokenReader) Next() (Token, bool) {
41 if reader.index+1 >= len(reader.tokens) {
42 return Token{Type: TokenType_EOF}, false
43 }
44 reader.index++
45 return reader.tokens[reader.index], true
46}
47
48// Peek returns the next token. Does not advance the reader. Returns false if there are no more tokens.
49func (reader *TokenReader) Peek() (Token, bool) {

Callers 1

ParseTokensFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected