MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / operator()

Method operator()

eval/public/ast_rewrite.cc:131–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129
130struct PreVisitor {
131 void operator()(const ExprRecord& record) {
132 Expr* expr = record.expr;
133 const SourcePosition position(expr->id(), record.source_info);
134 visitor->PreVisitExpr(expr, &position);
135 switch (expr->expr_kind_case()) {
136 case Expr::kSelectExpr:
137 visitor->PreVisitSelect(&expr->select_expr(), expr, &position);
138 break;
139 case Expr::kCallExpr:
140 visitor->PreVisitCall(&expr->call_expr(), expr, &position);
141 break;
142 case Expr::kComprehensionExpr:
143 visitor->PreVisitComprehension(&expr->comprehension_expr(), expr,
144 &position);
145 break;
146 default:
147 // No pre-visit action.
148 break;
149 }
150 }
151
152 // Do nothing for Arg variant.
153 void operator()(const ArgRecord&) {}

Callers

nothing calls this directly

Calls 6

idMethod · 0.45
PreVisitExprMethod · 0.45
PreVisitSelectMethod · 0.45
PreVisitCallMethod · 0.45
PreVisitComprehensionMethod · 0.45

Tested by

no test coverage detected