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

Method operator()

eval/public/ast_traverse.cc:122–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120
121struct PreVisitor {
122 void operator()(const ExprRecord& record) {
123 const Expr* expr = record.expr;
124 const SourcePosition position(expr->id(), record.source_info);
125 visitor->PreVisitExpr(expr, &position);
126 switch (expr->expr_kind_case()) {
127 case Expr::kConstExpr:
128 visitor->PreVisitConst(&expr->const_expr(), expr, &position);
129 break;
130 case Expr::kIdentExpr:
131 visitor->PreVisitIdent(&expr->ident_expr(), expr, &position);
132 break;
133 case Expr::kSelectExpr:
134 visitor->PreVisitSelect(&expr->select_expr(), expr, &position);
135 break;
136 case Expr::kCallExpr:
137 visitor->PreVisitCall(&expr->call_expr(), expr, &position);
138 break;
139 case Expr::kListExpr:
140 visitor->PreVisitCreateList(&expr->list_expr(), expr, &position);
141 break;
142 case Expr::kStructExpr:
143 visitor->PreVisitCreateStruct(&expr->struct_expr(), expr, &position);
144 break;
145 case Expr::kComprehensionExpr:
146 visitor->PreVisitComprehension(&expr->comprehension_expr(), expr,
147 &position);
148 break;
149 default:
150 // No pre-visit action.
151 break;
152 }
153 }
154
155 // Do nothing for Arg variant.
156 void operator()(const ArgRecord&) {}

Callers

nothing calls this directly

Calls 10

PreVisitConstMethod · 0.80
PreVisitIdentMethod · 0.80
PreVisitCreateListMethod · 0.80
PreVisitCreateStructMethod · 0.80
idMethod · 0.45
PreVisitExprMethod · 0.45
PreVisitSelectMethod · 0.45
PreVisitCallMethod · 0.45
PreVisitComprehensionMethod · 0.45

Tested by

no test coverage detected