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

Method VisitMemberCall

parser/parser.go:599–608  ·  view source on GitHub ↗

VisitMemberCall visits a parse tree produced by CELParser#MemberCall.

(ctx *gen.MemberCallContext)

Source from the content-addressed store, hash-verified

597
598// VisitMemberCall visits a parse tree produced by CELParser#MemberCall.
599func (p *parser) VisitMemberCall(ctx *gen.MemberCallContext) any {
600 operand := p.Visit(ctx.Member()).(ast.Expr)
601 // Handle the error case where no valid identifier is specified.
602 if ctx.GetId() == nil {
603 return p.helper.newExpr(ctx)
604 }
605 id := ctx.GetId().GetText()
606 opID := p.helper.id(ctx.GetOpen())
607 return p.receiverCallOrMacro(opID, id, operand, p.visitExprList(ctx.GetArgs())...)
608}
609
610// Visit a parse tree produced by CELParser#Index.
611func (p *parser) VisitIndex(ctx *gen.IndexContext) any {

Callers 1

VisitMethod · 0.95

Calls 10

VisitMethod · 0.95
receiverCallOrMacroMethod · 0.95
visitExprListMethod · 0.95
GetTextMethod · 0.80
idMethod · 0.80
GetIdMethod · 0.65
GetArgsMethod · 0.65
MemberMethod · 0.45
newExprMethod · 0.45
GetOpenMethod · 0.45

Tested by

no test coverage detected