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

Method ParseWithPositions

pkg/sql/parser/parser.go:356–358  ·  view source on GitHub ↗

ParseWithPositions parses tokens with position tracking for enhanced error reporting. ParseWithPositions parses a ConversionResult into an AST. Since models.TokenWithSpan already embeds span/position information, this is now a thin wrapper around parseTokens - no separate conversion step needed. T

(result *ConversionResult)

Source from the content-addressed store, hash-verified

354//
355// Thread Safety: NOT thread-safe - use separate parser instances per goroutine.
356func (p *Parser) ParseWithPositions(result *ConversionResult) (*ast.AST, error) {
357 return p.parseTokens(result.Tokens)
358}
359
360// ParseContext parses tokens into an AST with context support for cancellation and timeouts.
361//

Callers

nothing calls this directly

Calls 1

parseTokensMethod · 0.95

Tested by

no test coverage detected