MCPcopy Index your code
hub / github.com/nsf/gocode / token_items_to_string

Function token_items_to_string

cursorcontext.go:254–260  ·  view source on GitHub ↗

Given a slice of token_item, reassembles them into the original literal expression.

(tokens []token_item)

Source from the content-addressed store, hash-verified

252// Given a slice of token_item, reassembles them into the original literal
253// expression.
254func token_items_to_string(tokens []token_item) string {
255 var buf bytes.Buffer
256 for _, t := range tokens {
257 buf.WriteString(t.literal())
258 }
259 return buf.String()
260}
261
262// this function is called when the cursor is at the '.' and you need to get the
263// declaration before that dot

Callers 1

extract_go_exprMethod · 0.85

Calls 2

literalMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected