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