MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / Reset

Method Reset

pkg/sql/parser/parser.go:114–122  ·  view source on GitHub ↗

Reset clears the parser state for reuse from the pool.

()

Source from the content-addressed store, hash-verified

112
113// Reset clears the parser state for reuse from the pool.
114func (p *Parser) Reset() {
115 p.tokens = p.tokens[:0]
116 p.currentPos = 0
117 p.currentToken = models.TokenWithSpan{}
118 p.depth = 0
119 p.ctx = nil
120 p.strict = false
121 p.dialect = ""
122}
123
124// currentLocation returns the source location of the current token.
125// Span information is embedded directly in models.TokenWithSpan so no

Callers 3

PutParserFunction · 0.45
extractQueriesFunction · 0.45
splitStatementsFunction · 0.45

Calls

no outgoing calls

Tested by 2

extractQueriesFunction · 0.36
splitStatementsFunction · 0.36