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

Method VisitLogicalNot

parser/parser.go:556–563  ·  view source on GitHub ↗

Visit a parse tree produced by CELParser#LogicalNot.

(ctx *gen.LogicalNotContext)

Source from the content-addressed store, hash-verified

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

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