MCPcopy Create free account
hub / github.com/araddon/qlbridge / findAllIncludes

Function findAllIncludes

expr/include.go:95–123  ·  view source on GitHub ↗
(node Node, current []string)

Source from the content-addressed store, hash-verified

93}
94
95func findAllIncludes(node Node, current []string) []string {
96 switch n := node.(type) {
97 case *IncludeNode:
98 current = append(current, n.Identity.Text)
99 case *BinaryNode:
100 for _, arg := range n.Args {
101 current = findAllIncludes(arg, current)
102 }
103 case *BooleanNode:
104 for _, arg := range n.Args {
105 current = findAllIncludes(arg, current)
106 }
107 case *UnaryNode:
108 current = findAllIncludes(n.Arg, current)
109 case *TriNode:
110 for _, arg := range n.Args {
111 current = findAllIncludes(arg, current)
112 }
113 case *ArrayNode:
114 for _, arg := range n.Args {
115 current = findAllIncludes(arg, current)
116 }
117 case *FuncNode:
118 for _, arg := range n.Args {
119 current = findAllIncludes(arg, current)
120 }
121 }
122 return current
123}

Callers 1

FindIncludesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected