VisitChildren visits the node
(node antlr.RuleNode)
| 170 | |
| 171 | // VisitChildren visits the node |
| 172 | func (v *ASTBuilder) VisitChildren(node antlr.RuleNode) interface{} { |
| 173 | result := v.defaultResult() |
| 174 | if !reflect.ValueOf(node).IsNil() { |
| 175 | n := node.GetChildCount() |
| 176 | for i := 0; i < n && v.shouldVisitNextChild(node, result); i++ { |
| 177 | var c antlr.ParseTree |
| 178 | c = node.GetChild(i).(antlr.ParseTree) |
| 179 | childResult := c.Accept(v) |
| 180 | if v.SQL2AqlCtx.exprCheck == false { |
| 181 | result = v.aggregateResult(c, result, childResult) |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | return result |
| 187 | } |
| 188 | |
| 189 | func (v *ASTBuilder) visitIfPresent(ctx antlr.RuleContext, visitResult reflect.Type) interface{} { |
| 190 | if ctx == nil { |
no test coverage detected