Package org.aavso.tools.vstar.vela
Class VeLaScope
This class represents a VeLa scope assumed to exist within a stack of scopes,
with a global scope at the bottom and function scopes thereafter. Symbols in
each correspond to variable or function bindings.
-
Field Summary
Fields inherited from class org.aavso.tools.vstar.vela.VeLaEnvironment
cache, constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd all symbol bindings and functions from another scope to this one.voidaddFunctionExecutor(FunctionExecutor executor) Add a function executor to the multi-map.
If the new executor has the same signature as one already in existence, it will be replaced.booleanisEmpty()Is this scope empty?booleanIs this environment mutable (can be modified)?lookupFunction(String name) Lookup the named function, returning an optional list of functions.Methods inherited from class org.aavso.tools.vstar.vela.VeLaEnvironment
addAll, bind, hasBinding, lookup, toString
-
Constructor Details
-
VeLaScope
public VeLaScope()
-
-
Method Details
-
getFunctions
- Returns:
- the functions
-
isMutable
public boolean isMutable()Description copied from class:VeLaEnvironmentIs this environment mutable (can be modified)?- Overrides:
isMutablein classVeLaEnvironment<Operand>- Returns:
- true if mutable, false if not
-
addFunctionExecutor
Add a function executor to the multi-map.
If the new executor has the same signature as one already in existence, it will be replaced.- Parameters:
executor- The function executor to be added.
-
addAll
Add all symbol bindings and functions from another scope to this one.- Parameters:
other- The scope to be added to this one.
-
lookupFunction
Lookup the named function, returning an optional list of functions.- Parameters:
name- The desired function name.- Returns:
- An optional list of function executors.
-
isEmpty
public boolean isEmpty()Is this scope empty?- Overrides:
isEmptyin classVeLaEnvironment<Operand>
-