Visit a parse tree produced by CELParser#conditionalAnd.
(ctx *gen.ConditionalAndContext)
| 496 | |
| 497 | // Visit a parse tree produced by CELParser#conditionalAnd. |
| 498 | func (p *parser) VisitConditionalAnd(ctx *gen.ConditionalAndContext) any { |
| 499 | result := p.Visit(ctx.GetE()).(ast.Expr) |
| 500 | l := p.newLogicManager(operators.LogicalAnd, result) |
| 501 | rest := ctx.GetE1() |
| 502 | for i, op := range ctx.GetOps() { |
| 503 | if i >= len(rest) { |
| 504 | return p.reportError(ctx, "unexpected character, wanted '&&'") |
| 505 | } |
| 506 | next := p.Visit(rest[i]).(ast.Expr) |
| 507 | opID := p.helper.id(op) |
| 508 | l.addTerm(opID, next) |
| 509 | } |
| 510 | return l.toExpr() |
| 511 | } |
| 512 | |
| 513 | // Visit a parse tree produced by CELParser#relation. |
| 514 | func (p *parser) VisitRelation(ctx *gen.RelationContext) any { |
no test coverage detected