Package net.hydromatic.morel.compile
Interface CompiledStatement
-
public interface CompiledStatementStatement that has been compiled and is ready to be run from the REPL.If a declaration, it evaluates an expression and also creates a new environment (with new variables bound) and generates a line or two of output for the REPL.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voideval(Environment environment, java.util.List<java.lang.String> output, java.util.List<Binding> bindings)Evaluates this statement, adding lines of feedback tooutputand writing bindings (values to variables, and types definitions) tobindings.TypegetType()
-
-
-
Method Detail
-
eval
void eval(Environment environment, java.util.List<java.lang.String> output, java.util.List<Binding> bindings)
Evaluates this statement, adding lines of feedback tooutputand writing bindings (values to variables, and types definitions) tobindings. The environment for the next statement can be constructed from the bindings.- Parameters:
environment- Evaluation environmentoutput- List to which to append lines of outputbindings- List to which to append bound variables and types
-
getType
Type getType()
-
-