docs: public Scope getEnclosingScope() {
          AstNode parent = this.getParent();
          while (parent != null && !(parent instanceof Scope)) {
              parent = parent.getParent();
          }
          return (Scope)parent;
      }