Returns all parents of this node up to the root. If this node is the root, the iterable will be empty.
Iterable<AstNode> get parents sync* { var node = parent; while (node != null) { yield node; node = node.parent; } }