Interface Expression

All Known Implementing Classes:
Application, Conditional, Constant, Variable

public interface Expression

The representation of an expression; in other words, an AST.


Method Summary
 java.lang.Object eval(Environment env)
          Evaluate this expression.
 

Method Detail

eval

java.lang.Object eval(Environment env)
Evaluate this expression. When an Expression is evaluated, this must happen in some particular environment. For example, evaluating the variable x in one environment might produce a totally different value than evaluating it in another environment.

Parameters:
env - the environment in which the expression should be evaluated
Returns:
the value produced by the expression