MCPcopy Create free account
hub / github.com/bytebase/bytebase / nodeLocOf

Function nodeLocOf

backend/plugin/db/pg/query.go:320–327  ·  view source on GitHub ↗

nodeLocOf returns the Loc of a node, handling common wrapper types.

(node ast.Node)

Source from the content-addressed store, hash-verified

318
319// nodeLocOf returns the Loc of a node, handling common wrapper types.
320func nodeLocOf(node ast.Node) ast.Loc {
321 switch n := node.(type) {
322 case *ast.A_Const:
323 return n.Loc
324 default:
325 return ast.Loc{Start: -1, End: -1}
326 }
327}

Callers 1

rewriteSelectLimitFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected