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

Method VisitNegate

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

Source from the content-addressed store, hash-verified

555}
556
557func (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.
567func (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