MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / lexer

Struct lexer

pkg/sql/parser/lexer.go:21–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19)
20
21type lexer struct {
22 in string
23 // tokens contains tokens generated by the scanner.
24 tokens []sqlSymType
25
26 // The type that should be used when an INT or SERIAL is encountered.
27 nakedIntType *types.T
28
29 // lastPos is the position into the tokens slice of the last
30 // token returned by Lex().
31 lastPos int
32
33 stmt tree.Statement
34 // numPlaceholders is 1 + the highest placeholder index encountered.
35 numPlaceholders int
36 numAnnotations tree.AnnotationIdx
37
38 lastError error
39}
40
41func (l *lexer) init(sql string, tokens []sqlSymType, nakedIntType *types.T) {
42 l.in = sql

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected