Visit a parse tree produced by CELParser#conditionalOr.
(ctx *gen.ConditionalOrContext)
| 480 | |
| 481 | // Visit a parse tree produced by CELParser#conditionalOr. |
| 482 | func (p *parser) VisitConditionalOr(ctx *gen.ConditionalOrContext) any { |
| 483 | result := p.Visit(ctx.GetE()).(ast.Expr) |
| 484 | l := p.newLogicManager(operators.LogicalOr, result) |
| 485 | rest := ctx.GetE1() |
| 486 | for i, op := range ctx.GetOps() { |
| 487 | if i >= len(rest) { |
| 488 | return p.reportError(ctx, "unexpected character, wanted '||'") |
| 489 | } |
| 490 | next := p.Visit(rest[i]).(ast.Expr) |
| 491 | opID := p.helper.id(op) |
| 492 | l.addTerm(opID, next) |
| 493 | } |
| 494 | return l.toExpr() |
| 495 | } |
| 496 | |
| 497 | // Visit a parse tree produced by CELParser#conditionalAnd. |
| 498 | func (p *parser) VisitConditionalAnd(ctx *gen.ConditionalAndContext) any { |
no test coverage detected