MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / visitMemberCall

Method visitMemberCall

parser/parser.cc:1051–1063  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1049}
1050
1051std::any ParserVisitor::visitMemberCall(CelParser::MemberCallContext* ctx) {
1052 auto operand = ExprFromAny(visit(ctx->member()));
1053 // Handle the error case where no valid identifier is specified.
1054 if (!ctx->id) {
1055 return ExprToAny(factory_.NewUnspecified(
1056 factory_.NextId(SourceRangeFromParserRuleContext(ctx))));
1057 }
1058 auto id = ctx->id->getText();
1059 int64_t op_id = factory_.NextId(SourceRangeFromToken(ctx->open));
1060 auto args = visitList(ctx->args);
1061 return ExprToAny(
1062 ReceiverCallOrMacroImpl(op_id, id, std::move(operand), std::move(args)));
1063}
1064
1065std::any ParserVisitor::visitIndex(CelParser::IndexContext* ctx) {
1066 auto target = ExprFromAny(visit(ctx->member()));

Callers

nothing calls this directly

Calls 8

ExprFromAnyFunction · 0.85
ExprToAnyFunction · 0.85
SourceRangeFromTokenFunction · 0.85
memberMethod · 0.80
getTextMethod · 0.80
NewUnspecifiedMethod · 0.45
NextIdMethod · 0.45

Tested by

no test coverage detected