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

Method operator()

common/ast_rewrite.cc:299–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297
298struct PushDepsVisitor {
299 void operator()(const ExprRecord& record) {
300 struct {
301 std::stack<StackRecord>& stack;
302 const RewriteTraversalOptions& options;
303 const ExprRecord& record;
304 void operator()(const Constant&) {}
305 void operator()(const IdentExpr&) {}
306 void operator()(const SelectExpr&) {
307 PushSelectDeps(&record.expr->mutable_select_expr(), &stack);
308 }
309 void operator()(const CallExpr&) {
310 PushCallDeps(&record.expr->mutable_call_expr(), record.expr, &stack);
311 }
312 void operator()(const ListExpr&) {
313 PushListDeps(&record.expr->mutable_list_expr(), &stack);
314 }
315 void operator()(const StructExpr&) {
316 PushStructDeps(&record.expr->mutable_struct_expr(), &stack);
317 }
318 void operator()(const MapExpr&) {
319 PushMapDeps(&record.expr->mutable_map_expr(), &stack);
320 }
321 void operator()(const ComprehensionExpr&) {
322 PushComprehensionDeps(&record.expr->mutable_comprehension_expr(),
323 record.expr, &stack,
324 options.use_comprehension_callbacks);
325 }
326 void operator()(const UnspecifiedExpr&) {}
327 } handler{stack, options, record};
328 absl::visit(handler, record.expr->kind());
329 }
330
331 void operator()(const ArgRecord& record) {
332 stack.push(StackRecord(record.expr));

Callers

nothing calls this directly

Calls 8

PushSelectDepsFunction · 0.70
PushCallDepsFunction · 0.70
PushListDepsFunction · 0.70
PushStructDepsFunction · 0.70
PushMapDepsFunction · 0.70
PushComprehensionDepsFunction · 0.70
StackRecordClass · 0.70
kindMethod · 0.45

Tested by

no test coverage detected