@Test public void shouldThrow_whenEnteringScopeWithModuleName() { exception.expect(IllegalStateException.class); moduleScope.enterScope("module.name"); }
@Override public Scope enterScope(List<Import> imports) { ImportScope scope = new ImportScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName, ImmutableList.<Import>builder() .add(moduleImport(NULL_SOURCE, "scotch.lang")) .addAll(imports) .build()); importScopes.add(scope); return scope; }
ModuleScope extends BlockScope { @Override public Scope enterScope(List<Import> imports) { ImportScope scope = new ImportScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName, ImmutableList.<Import>builder() .add(moduleImport(NULL_SOURCE, "scotch.lang")) .addAll(imports) .build()); importScopes.add(scope); return scope; } }
ModuleScope extends BlockScope { @Override public Scope enterScope(List<Import> imports) { ImportScope scope = new ImportScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName, ImmutableList.<Import>builder() .add(moduleImport(NULL_SOURCE, "scotch.lang")) .addAll(imports) .build()); importScopes.add(scope); return scope; } ModuleScope(Scope parent, TypeScope types, SymbolResolver resolver, SymbolGenerator symbolGenerator, String moduleName); }
ModuleScope extends BlockScope { @Override public Scope enterScope(List<Import> imports) { ImportScope scope = new ImportScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName, ImmutableList.<Import>builder() .add(moduleImport(NULL_SOURCE, "scotch.lang")) .addAll(imports) .build()); importScopes.add(scope); return scope; } ModuleScope(Scope parent, TypeScope types, SymbolResolver resolver, SymbolGenerator symbolGenerator, String moduleName); @Override Scope enterScope(List<Import> imports); @Override Set<Symbol> getContext(Type type); @Override Optional<TypeClassDescriptor> getMemberOf(ValueReference valueRef); @Override Optional<Operator> getOperator(Symbol symbol); @Override Optional<Type> getRawValue(Symbol symbol); @Override Optional<SymbolEntry> getSiblingEntry(Symbol symbol); @Override boolean isDefined(Symbol symbol); @Override Optional<Symbol> qualify(Symbol symbol); }
ModuleScope extends BlockScope { @Override public Scope enterScope(List<Import> imports) { ImportScope scope = new ImportScope(this, new DefaultTypeScope(symbolGenerator, resolver), resolver, symbolGenerator, moduleName, ImmutableList.<Import>builder() .add(moduleImport(NULL_SOURCE, "scotch.lang")) .addAll(imports) .build()); importScopes.add(scope); return scope; } ModuleScope(Scope parent, TypeScope types, SymbolResolver resolver, SymbolGenerator symbolGenerator, String moduleName); @Override Scope enterScope(List<Import> imports); @Override Set<Symbol> getContext(Type type); @Override Optional<TypeClassDescriptor> getMemberOf(ValueReference valueRef); @Override Optional<Operator> getOperator(Symbol symbol); @Override Optional<Type> getRawValue(Symbol symbol); @Override Optional<SymbolEntry> getSiblingEntry(Symbol symbol); @Override boolean isDefined(Symbol symbol); @Override Optional<Symbol> qualify(Symbol symbol);  }