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

Method visitNegate

parser/parser.cc:996–1004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

994}
995
996std::any ParserVisitor::visitNegate(CelParser::NegateContext* ctx) {
997 if (ctx->ops.size() % 2 == 0) {
998 return visit(ctx->member());
999 }
1000 int64_t op_id = factory_.NextId(SourceRangeFromToken(ctx->ops[0]));
1001 auto target = ExprFromAny(visit(ctx->member()));
1002 return ExprToAny(
1003 GlobalCallOrMacro(op_id, CelOperator::NEGATE, std::move(target)));
1004}
1005
1006std::string ParserVisitor::NormalizeIdentifier(
1007 CelParser::EscapeIdentContext* ctx) {

Callers

nothing calls this directly

Calls 6

SourceRangeFromTokenFunction · 0.85
ExprFromAnyFunction · 0.85
ExprToAnyFunction · 0.85
memberMethod · 0.80
sizeMethod · 0.45
NextIdMethod · 0.45

Tested by

no test coverage detected