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