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

Struct lexer

pkg/sql/plpgsql/parser/lexer.go:21–42  ·  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 []plpgsqlSymType
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 *plpgsqltree.Block
34
35 // numPlaceholders is 1 + the highest placeholder index encountered.
36 numPlaceholders int
37 numAnnotations tree.AnnotationIdx
38
39 lastError error
40
41 parser plpgsqlParser
42}
43
44func (l *lexer) init(sql string, tokens []plpgsqlSymType, nakedIntType *types.T, p plpgsqlParser) {
45 l.in = sql

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected