code: public Env<AttrContext> attribute(Env<AttrContext> env) {
          if (compileStates.isDone(env, CompileState.ATTR))
              return env;
  
          if (verboseCompilePolicy)
              printNote("[attribute " + env.enclClass.sym + "]");
          if (verbose)
              log.printVerbose("checking.attribution", env.enclClass.sym);
  
          if (!taskListener.isEmpty()) {
              TaskEvent e = new TaskEvent(TaskEvent.Kind.ANALYZE, env.toplevel, env.enclClass.sym);
              taskListener.started(e);
          }
  
          JavaFileObject prev = log.useSource(
                                    env.enclClass.sym.sourcefile != null ?
                                    env.enclClass.sym.sourcefile :
                                    env.toplevel.sourcefile);
          try {
              attr.attrib(env);
              if (errorCount() > 0 && !shouldStop(CompileState.ATTR)) {
                  //if in fail-over mode, ensure that AST expression nodes
                  //are correctly initialized (e.g. they have a type/symbol)
                  attr.postAttr(env.tree);
              }
              compileStates.put(env, CompileState.ATTR);
          }
          finally {
              log.useSource(prev);
          }
  
          return env;
      }
docs: Attribute a parse tree.
  @return the attributed parse tree