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

Function AstTraverse

common/ast_traverse.cc:362–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

360}
361
362void AstTraverse(const Expr& expr, AstVisitor& visitor,
363 TraversalOptions options) {
364 std::stack<StackRecord> stack;
365 stack.push(StackRecord(&expr));
366
367 while (!stack.empty()) {
368 StackRecord& record = stack.top();
369 if (!record.visited) {
370 PreVisit(record, &visitor);
371 PushDependencies(record, stack, options);
372 record.visited = true;
373 } else {
374 PostVisit(record, &visitor);
375 stack.pop();
376 }
377 }
378}
379
380} // namespace cel

Callers 3

BuildMethod · 0.70
TESTFunction · 0.70
BuildMethod · 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