MCPcopy Index your code
hub / github.com/bytebase/bytebase / findCaretTokenIndex

Function findCaretTokenIndex

backend/plugin/parser/plsql/completion.go:125–132  ·  view source on GitHub ↗
(tokens []oracleparser.Token, byteOffset int)

Source from the content-addressed store, hash-verified

123}
124
125func findCaretTokenIndex(tokens []oracleparser.Token, byteOffset int) int {
126 for i, tok := range tokens {
127 if tok.Loc >= byteOffset {
128 return i
129 }
130 }
131 return len(tokens)
132}
133
134func (c *Completer) completion() ([]base.Candidate, error) {
135 checkTokenQuoted := func(idx int) bool {

Callers 1

newCompleterFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected