Class CalcLoxRunner

java.lang.Object
tech.ixor.calclox.CalcLoxRunner

public final class CalcLoxRunner extends Object
Entry point for executing CalcLox programs in an embedding application.

This class performs the full scan, parse, resolve, and interpret pipeline. It does not retain interpreter state between calls; persistent numeric state belongs in the host's CalculatorFrontend.variables() map.

  • Method Details

    • run

      public static void run(CalculatorFrontend frontend, String source)
      Executes source code with a fresh interpreter. Program state is isolated from previous and concurrent calls, while numeric variables are synchronized through the supplied frontend.
      Parameters:
      frontend - host integration for variables and output
      source - the CalcLox source code to be executed
      Throws:
      IllegalArgumentException - if either argument is null
      CalcLoxRunnerError - if scanning, parsing, resolution, or execution fails