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

Function AstTraverse

eval/public/ast_traverse.cc:347–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345} // namespace
346
347void AstTraverse(const Expr* expr, const SourceInfo* source_info,
348 AstVisitor* visitor, TraversalOptions options) {
349 std::stack<StackRecord> stack;
350 stack.push(StackRecord(expr, source_info));
351
352 while (!stack.empty()) {
353 StackRecord& record = stack.top();
354 if (!record.visited) {
355 PreVisit(record, visitor);
356 PushDependencies(record, stack, options);
357 record.visited = true;
358 } else {
359 PostVisit(record, visitor);
360 stack.pop();
361 }
362 }
363}
364
365} // namespace google::api::expr::runtime

Callers 2

TESTFunction · 0.70
CreateExpressionImplMethod · 0.50

Calls 5

StackRecordClass · 0.70
PreVisitFunction · 0.70
PushDependenciesFunction · 0.70
PostVisitFunction · 0.70
emptyMethod · 0.45

Tested by 1

TESTFunction · 0.56