Interface CalculatorFrontend


public interface CalculatorFrontend
Connects a host application to CalcLox input variables and program output.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    output(String result)
    Receives the textual value produced by an output statement.
    Returns the mutable variable map shared with a program.
  • Method Details

    • variables

      Map<String,Double> variables()
      Returns the mutable variable map shared with a program. A define name; declaration reads from this map; numeric CalcLox declarations and assignments are written back to it.
      Returns:
      the mutable host variable map, or null when host variables are unsupported
    • output

      void output(String result)
      Receives the textual value produced by an output statement.
      Parameters:
      result - the result to be displayed