docs: public AstRoot getAstRoot() {
          AstNode parent = this;  // this node could be the AstRoot
          while (parent != null && !(parent instanceof AstRoot)) {
              parent = parent.getParent();
          }
          return (AstRoot)parent;
      }