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

Method Peek

testing/generation/command_docs/scanner.go:56–61  ·  view source on GitHub ↗

Peek returns the next rune. Does not advance the scanner. Returns false if there are no more runes.

()

Source from the content-addressed store, hash-verified

54
55// Peek returns the next rune. Does not advance the scanner. Returns false if there are no more runes.
56func (scanner *Scanner) Peek() (rune, bool) {
57 if scanner.sourceIdx+1 >= len(scanner.source) {
58 return 0, false
59 }
60 return scanner.source[scanner.sourceIdx+1], true
61}
62
63// PeekBy returns the next rune that is n positions from the current rune. Does not advance the scanner. Returns false
64// if we are peeking beyond the source.

Callers 1

ProcessMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected