slogo.language
Interface Context
- All Known Implementing Classes:
- SLogoContext
public interface Context
Context is a hook for implementing language features that require an
environment for evaluation. For example, in parsing MoboLogo/Slogo/Logo you
might need to update a Turtle model, or use a Graphics object to display
information. These objects can be made accessible via the Context class so
that an
slogo.instruction.Instruction
can execute and modify/access the Context as appropriate.
Method Summary |
java.lang.Object |
value(java.lang.String name)
If there are local/global variables, a variable might have a different
value depending on the Context, so Contexts should support determining
the value of an identifier (this method may be superfluous). |
value
java.lang.Object value(java.lang.String name)
- If there are local/global variables, a variable might have a different
value depending on the Context, so Contexts should support determining
the value of an identifier (this method may be superfluous).
- Parameters:
name
- identifier being evaluated in this Context
- Returns:
- the value of the identifier in this Context