Interface CompiledStatement


  • public interface CompiledStatement
    Statement 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
      void eval​(Environment environment, java.util.List<java.lang.String> output, java.util.List<Binding> bindings)
      Evaluates this statement, adding lines of feedback to output and writing bindings (values to variables, and types definitions) to bindings.
      Type getType()  
    • 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 to output and writing bindings (values to variables, and types definitions) to bindings. The environment for the next statement can be constructed from the bindings.
        Parameters:
        environment - Evaluation environment
        output - List to which to append lines of output
        bindings - List to which to append bound variables and types
      • getType

        Type getType()