Visit a parse tree produced by CELParser#relation.
(ctx *gen.RelationContext)
| 520 | |
| 521 | // Visit a parse tree produced by CELParser#relation. |
| 522 | func (p *parser) VisitRelation(ctx *gen.RelationContext) any { |
| 523 | opText := "" |
| 524 | if ctx.GetOp() != nil { |
| 525 | opText = ctx.GetOp().GetText() |
| 526 | } |
| 527 | if op, found := operators.Find(opText); found { |
| 528 | lhs := p.Visit(ctx.Relation(0)).(ast.Expr) |
| 529 | opID := p.helper.id(ctx.GetOp()) |
| 530 | rhs := p.Visit(ctx.Relation(1)).(ast.Expr) |
| 531 | return p.globalCallOrMacro(opID, op, lhs, rhs) |
| 532 | } |
| 533 | return p.reportError(ctx, "operator not found") |
| 534 | } |
| 535 | |
| 536 | // Visit a parse tree produced by CELParser#calc. |
| 537 | func (p *parser) VisitCalc(ctx *gen.CalcContext) any { |
no test coverage detected