예제 #1
0
 @Override
 public void enterModuleDecl(ResolveParser.ModuleDeclContext ctx) {
   try {
     moduleScope = symtab.getModuleScope(tr.getModuleIdentifier());
   } catch (NoSuchModuleException e) { // shouldn't happen, but eh.
     gen.getCompiler().errMgr.semanticError(ErrorKind.NO_SUCH_MODULE, Utils.getModuleCtxName(ctx));
   }
 }
예제 #2
0
 public List<ModuleParameterSymbol> getAllModuleParameterSyms() {
   List<ModuleParameterSymbol> result = moduleScope.getSymbolsOfType(ModuleParameterSymbol.class);
   for (ModuleIdentifier e : moduleScope.getInheritedIdentifiers()) {
     try {
       ModuleScopeBuilder s = symtab.getModuleScope(e);
       result.addAll(s.getSymbolsOfType(ModuleParameterSymbol.class));
     } catch (NoSuchModuleException e1) { // should've been caught a long time ago
       throw new RuntimeException(e1);
     }
   }
   return result;
 }