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(Session session, Environment environment, Consumer<String> outLines, Consumer<Binding> outBindings)Evaluates this statement, adding lines of feedback tooutputand writing bindings (values to variables, and types definitions) tobindings.TypegetType()
-
-
-
Method Detail
-
eval
void eval(Session session, Environment environment, Consumer<String> outLines, Consumer<Binding> outBindings)
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:
session- Sessionenvironment- Evaluation environmentoutLines- List to which to append lines of outputoutBindings- List to which to append bound variables and types
-
getType
Type getType()
-
-