コード例 #1
0
ファイル: Enter.java プロジェクト: FCSu/DP2011Fall_hw07
 public Env<AttrContext> getTopLevelEnv(JCCompilationUnit tree) {
   Env<AttrContext> localEnv = new Env<AttrContext>(tree, new AttrContext());
   localEnv.toplevel = tree;
   localEnv.enclClass = predefClassDef;
   localEnv.info.scope = tree.namedImportScope;
   localEnv.info.lint = lint;
   return localEnv;
 }
コード例 #2
0
ファイル: Enter.java プロジェクト: FCSu/DP2011Fall_hw07
 /**
  * Create a fresh environment for toplevels.
  *
  * @param tree The toplevel tree.
  */
 Env<AttrContext> topLevelEnv(JCCompilationUnit tree) {
   Env<AttrContext> localEnv = new Env<AttrContext>(tree, new AttrContext());
   localEnv.toplevel = tree;
   localEnv.enclClass = predefClassDef;
   tree.namedImportScope = new Scope.ImportScope(tree.packge);
   tree.starImportScope = new Scope.ImportScope(tree.packge);
   localEnv.info.scope = tree.namedImportScope;
   localEnv.info.lint = lint;
   return localEnv;
 }