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

Method Step

common/ast_traverse.cc:340–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338AstTraversal::~AstTraversal() = default;
339
340bool AstTraversal::Step(AstVisitor& visitor) {
341 if (IsDone()) {
342 return false;
343 }
344 auto& stack = state_->stack;
345 StackRecord& record = stack.top();
346 if (!record.visited) {
347 PreVisit(record, &visitor);
348 PushDependencies(record, stack, options_);
349 record.visited = true;
350 } else {
351 PostVisit(record, &visitor);
352 stack.pop();
353 }
354
355 return !stack.empty();
356}
357
358bool AstTraversal::IsDone() {
359 return state_ == nullptr || state_->stack.empty();

Callers 2

CheckMethod · 0.45
TESTFunction · 0.45

Calls 4

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

Tested by 1

TESTFunction · 0.36