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

Method VisitLogicalNot

parser/parser.go:548–555  ·  view source on GitHub ↗

Visit a parse tree produced by CELParser#LogicalNot.

(ctx *gen.LogicalNotContext)

Source from the content-addressed store, hash-verified

546
547// Visit a parse tree produced by CELParser#LogicalNot.
548func (p *parser) VisitLogicalNot(ctx *gen.LogicalNotContext) any {
549 if len(ctx.GetOps())%2 == 0 {
550 return p.Visit(ctx.Member())
551 }
552 opID := p.helper.id(ctx.GetOps()[0])
553 target := p.Visit(ctx.Member()).(ast.Expr)
554 return p.globalCallOrMacro(opID, operators.LogicalNot, target)
555}
556
557func (p *parser) VisitNegate(ctx *gen.NegateContext) any {
558 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