(ctx *gen.NegateContext)
| 555 | } |
| 556 | |
| 557 | func (p *parser) VisitNegate(ctx *gen.NegateContext) any { |
| 558 | if len(ctx.GetOps())%2 == 0 { |
| 559 | return p.Visit(ctx.Member()) |
| 560 | } |
| 561 | opID := p.helper.id(ctx.GetOps()[0]) |
| 562 | target := p.Visit(ctx.Member()).(ast.Expr) |
| 563 | return p.globalCallOrMacro(opID, operators.Negate, target) |
| 564 | } |
| 565 | |
| 566 | // VisitSelect visits a parse tree produced by CELParser#Select. |
| 567 | func (p *parser) VisitSelect(ctx *gen.SelectContext) any { |