slogo.jelan
Interface Context


public interface Context

Context is a hook for implementing language features that require an environment for evaluation. For example, in parsing 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 jelan.elan.instruction.Instruction can execute and modify/access the Context as appropriate.


Method Summary
 double 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).
 

Method Detail

value

double 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