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

Function NewScanner

testing/generation/command_docs/scanner.go:34–44  ·  view source on GitHub ↗

NewScanner returns a new *Scanner by reading through the synopsis.

(synopsis string)

Source from the content-addressed store, hash-verified

32
33// NewScanner returns a new *Scanner by reading through the synopsis.
34func NewScanner(synopsis string) *Scanner {
35 scanner := &Scanner{
36 source: []rune(strings.ReplaceAll(synopsis, "\r", "")),
37 tokens: nil,
38 sourceIdx: -1,
39 isFinished: false,
40 savedErr: nil,
41 }
42 _, _ = scanner.Process()
43 return scanner
44}
45
46// Next returns the next rune while advancing the scanner. Returns false if there are no more runes.
47func (scanner *Scanner) Next() (rune, bool) {

Callers 3

customDefinitionFunction · 0.85

Calls 1

ProcessMethod · 0.95

Tested by

no test coverage detected