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

Function listLoc

backend/plugin/parser/tsql/backup.go:551–559  ·  view source on GitHub ↗
(list *ast.List)

Source from the content-addressed store, hash-verified

549}
550
551func listLoc(list *ast.List) ast.Loc {
552 if list == nil || len(list.Items) == 0 {
553 return ast.NoLoc()
554 }
555 return ast.Loc{
556 Start: dmlNodeLoc(list.Items[0]).Start,
557 End: dmlNodeLoc(list.Items[len(list.Items)-1]).End,
558 }
559}
560
561func dmlNodeLoc(node ast.Node) ast.Loc {
562 if common.IsNil(node) {

Callers 1

dmlFromSourceFunction · 0.85

Calls 1

dmlNodeLocFunction · 0.85

Tested by

no test coverage detected