code: public Env<A> enclosing(JCTree.Tag tag) {
          Env<A> env1 = this;
          while (env1 != null && !env1.tree.hasTag(tag)) env1 = env1.next;
          return env1;
      }
docs: Return closest enclosing environment which points to a tree with given tag.