Visit a parse tree produced by CELParser#expr.
(ctx *gen.ExprContext)
| 468 | |
| 469 | // Visit a parse tree produced by CELParser#expr. |
| 470 | func (p *parser) VisitExpr(ctx *gen.ExprContext) any { |
| 471 | result := p.Visit(ctx.GetE()).(ast.Expr) |
| 472 | if ctx.GetOp() == nil { |
| 473 | return result |
| 474 | } |
| 475 | opID := p.helper.id(ctx.GetOp()) |
| 476 | ifTrue := p.Visit(ctx.GetE1()).(ast.Expr) |
| 477 | ifFalse := p.Visit(ctx.GetE2()).(ast.Expr) |
| 478 | return p.globalCallOrMacro(opID, operators.Conditional, result, ifTrue, ifFalse) |
| 479 | } |
| 480 | |
| 481 | // Visit a parse tree produced by CELParser#conditionalOr. |
| 482 | func (p *parser) VisitConditionalOr(ctx *gen.ConditionalOrContext) any { |