Visit a parse tree produced by CELParser#expr.
(ctx *gen.ExprContext)
| 476 | |
| 477 | // Visit a parse tree produced by CELParser#expr. |
| 478 | func (p *parser) VisitExpr(ctx *gen.ExprContext) any { |
| 479 | result := p.Visit(ctx.GetE()).(ast.Expr) |
| 480 | if ctx.GetOp() == nil { |
| 481 | return result |
| 482 | } |
| 483 | opID := p.helper.id(ctx.GetOp()) |
| 484 | ifTrue := p.Visit(ctx.GetE1()).(ast.Expr) |
| 485 | ifFalse := p.Visit(ctx.GetE2()).(ast.Expr) |
| 486 | return p.globalCallOrMacro(opID, operators.Conditional, result, ifTrue, ifFalse) |
| 487 | } |
| 488 | |
| 489 | // Visit a parse tree produced by CELParser#conditionalOr. |
| 490 | func (p *parser) VisitConditionalOr(ctx *gen.ConditionalOrContext) any { |