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

Method operator()

eval/public/ast_traverse.cc:173–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171
172struct PostVisitor {
173 void operator()(const ExprRecord& record) {
174 const Expr* expr = record.expr;
175 const SourcePosition position(expr->id(), record.source_info);
176 switch (expr->expr_kind_case()) {
177 case Expr::kConstExpr:
178 visitor->PostVisitConst(&expr->const_expr(), expr, &position);
179 break;
180 case Expr::kIdentExpr:
181 visitor->PostVisitIdent(&expr->ident_expr(), expr, &position);
182 break;
183 case Expr::kSelectExpr:
184 visitor->PostVisitSelect(&expr->select_expr(), expr, &position);
185 break;
186 case Expr::kCallExpr:
187 visitor->PostVisitCall(&expr->call_expr(), expr, &position);
188 break;
189 case Expr::kListExpr:
190 visitor->PostVisitCreateList(&expr->list_expr(), expr, &position);
191 break;
192 case Expr::kStructExpr:
193 visitor->PostVisitCreateStruct(&expr->struct_expr(), expr, &position);
194 break;
195 case Expr::kComprehensionExpr:
196 visitor->PostVisitComprehension(&expr->comprehension_expr(), expr,
197 &position);
198 break;
199 default:
200 ABSL_LOG(ERROR) << "Unsupported Expr kind: " << expr->expr_kind_case();
201 }
202
203 visitor->PostVisitExpr(expr, &position);
204 }
205
206 void operator()(const ArgRecord& record) {
207 const Expr* expr = record.expr;

Callers

nothing calls this directly

Calls 12

idMethod · 0.45
PostVisitConstMethod · 0.45
PostVisitIdentMethod · 0.45
PostVisitSelectMethod · 0.45
PostVisitCallMethod · 0.45
PostVisitCreateListMethod · 0.45
PostVisitCreateStructMethod · 0.45
PostVisitExprMethod · 0.45
PostVisitTargetMethod · 0.45
PostVisitArgMethod · 0.45

Tested by

no test coverage detected