ancestors property

Iterable<Node> get ancestors

This node's ancestors in the tree.

Implementation

Iterable<Node> get ancestors sync* {
  var ancestor = parent;

  while (ancestor != null) {
    yield ancestor;
    ancestor = ancestor.parent;
  }
}