Class MutatedOnlyVariables.Collector
java.lang.Object
org.ek9lang.compiler.phase5.MutatedOnlyVariables.Collector
- Enclosing class:
MutatedOnlyVariables
One source's collection. Callables nest (a dynamic class or function inside a method), so their returning
variables are kept on a stack and an assignment is matched against the innermost.
-
Method Summary
Modifier and TypeMethodDescription(package private) voidA pointer assignment to the innermost callable's returning variable is a source of what it returns.(package private) voidenterCallable(ISymbol symbol) A method, operator, function or dynamic function is entered; only one with a returning variable is followed.(package private) voidenterCallable(ISymbol symbol, boolean inheritsBody) AsenterCallable(ISymbol); a dynamic function with no body of its own (inheritsBody) is also queued for the inherited-rules step of both derivations (MutatedOnlyVariables.inheritingBodies).(package private) void(package private) voidAfor item in itemsloop: its variable is an ELEMENT of the iterated expression - a view of it, asitems.iterator().next()is - so the expression is the variable's source.(package private) voidvariableDeclared(EK9Parser.VariableDeclarationContext ctx, ISymbol symbol)
-
Method Details
-
variableDeclared
-
enterCallable
A method, operator, function or dynamic function is entered; only one with a returning variable is followed. Its returning variable's initialiser is read when the walk reaches the declaration (variableDeclared(EK9Parser.VariableDeclarationContext, ISymbol)). -
enterCallable
AsenterCallable(ISymbol); a dynamic function with no body of its own (inheritsBody) is also queued for the inherited-rules step of both derivations (MutatedOnlyVariables.inheritingBodies). -
exitCallable
void exitCallable() -
assignment
A pointer assignment to the innermost callable's returning variable is a source of what it returns. -
forLoop
Afor item in itemsloop: its variable is an ELEMENT of the iterated expression - a view of it, asitems.iterator().next()is - so the expression is the variable's source.
-