java.lang.Object
de.grogra.xl.compiler.scope.Scope
de.grogra.xl.compiler.scope.BlockScope
- Direct Known Subclasses:
InstanceScope,MethodScope
A
BlockScope represents a scope for local variables.- Author:
- Ole Kniemeyer
-
Constructor Summary
ConstructorsConstructorDescriptionBlockScope(Scope enclosing) BlockScope(Scope enclosing, boolean seq) BlockScope(Scope enclosing, Expression block) -
Method Summary
Modifier and TypeMethodDescriptionvoidfinal LocaldeclareLocal(String name, long modifiers, Type type, antlr.collections.AST pos) voidvoidfindMembers(String name, int flags, Members list) Finds all members which are declared in this scope or enclosing scopes.getBlock()intgetTypeScope(Type localClass) final StringgetUniqueName(String name) voidvoidreceiveLocals(BlockScope src, antlr.collections.AST behind) setBlock(Expression block) voidsetDeclaredClassCount(int c) voidsetScopeForLocals(BlockScope scope) voidsetUseNewScopeForQueries(boolean newScope) booleanMethods inherited from class de.grogra.xl.compiler.scope.Scope
dump, encloses, getCompiler, getDeclaredEntity, getDeclaredType, getDefaultModuleSuperclass, getEnclosingScope, getExtension, getInstantiationProducerType, getOwnerOf, getPackage, getPropertyModel, getQueryModel, getRoot, insert, isD2FImplicit, isEnabledConversion, isShadowedBy, isStatic
-
Constructor Details
-
BlockScope
-
BlockScope
-
BlockScope
-
-
Method Details
-
getProduceScope
-
setUseNewScopeForQueries
public void setUseNewScopeForQueries(boolean newScope) -
useNewScopeForQueries
public boolean useNewScopeForQueries() -
setScopeForLocals
-
findMembers
Description copied from class:ScopeFinds all members which are declared in this scope or enclosing scopes. This method should be overwritten by subclasses; an invocation ofsuper.findMembershas to be included in order to look for members in enclosing scopes. Theflagsare a combination of the bit masks defined inMembers, they are used to restrict the range of possible members.- Overrides:
findMembersin classScope- Parameters:
name- simple name of the members to findflags- combination of masks defined inMemberslist- found members are added to this list
-
findLocal
-
findClass
-
getTypeScope
-
declareLocalClass
-
getDeclaredClassCount
public int getDeclaredClassCount() -
setDeclaredClassCount
public void setDeclaredClassCount(int c) -
addExpression
-
prependExpression
-
getBlock
-
setBlock
-
nextUniqueId
-
getUniqueName
-
declareLocal
-
getMethodScope
-
createThis
-
receiveLocals
-
getLocals
-