(root ast.Node)
| 182 | } |
| 183 | |
| 184 | func rangeVars(root ast.Node) []*ast.RangeVar { |
| 185 | var vars []*ast.RangeVar |
| 186 | find := astutils.VisitorFunc(func(node ast.Node) { |
| 187 | switch n := node.(type) { |
| 188 | case *ast.RangeVar: |
| 189 | vars = append(vars, n) |
| 190 | } |
| 191 | }) |
| 192 | astutils.Walk(find, root) |
| 193 | return vars |
| 194 | } |
| 195 | |
| 196 | func uniqueParamRefs(in []paramRef, dollar bool) []paramRef { |
| 197 | m := make(map[int]bool, len(in)) |
no test coverage detected