MCPcopy Create free account
hub / github.com/cel-expr/cel-go / VisitNegate

Method VisitNegate

parser/parser.go:565–572  ·  view source on GitHub ↗
(ctx *gen.NegateContext)

Source from the content-addressed store, hash-verified

563}
564
565func (p *parser) VisitNegate(ctx *gen.NegateContext) any {
566 if len(ctx.GetOps())%2 == 0 {
567 return p.Visit(ctx.Member())
568 }
569 opID := p.helper.id(ctx.GetOps()[0])
570 target := p.Visit(ctx.Member()).(ast.Expr)
571 return p.globalCallOrMacro(opID, operators.Negate, target)
572}
573
574// VisitSelect visits a parse tree produced by CELParser#Select.
575func (p *parser) VisitSelect(ctx *gen.SelectContext) any {

Callers 1

VisitMethod · 0.95

Calls 5

VisitMethod · 0.95
globalCallOrMacroMethod · 0.95
idMethod · 0.80
GetOpsMethod · 0.65
MemberMethod · 0.45

Tested by

no test coverage detected