visitAllNodes method

void visitAllNodes(
  1. AstNode root
)

Visit all nodes in the tree starting at the given root node, in breadth-first order.

Implementation

void visitAllNodes(AstNode root) {
  _queue.add(root);
  while (_queue.isNotEmpty) {
    AstNode next = _queue.removeFirst();
    next.accept(this);
  }
}