Package tech.ixor.calclox
Class CalcLoxRunner
java.lang.Object
tech.ixor.calclox.CalcLoxRunner
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 Summary
Modifier and TypeMethodDescriptionstatic voidrun(CalculatorFrontend frontend, String source) Executes source code with a fresh interpreter.
-
Method Details
-
run
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 outputsource- the CalcLox source code to be executed- Throws:
IllegalArgumentException- if either argument isnullCalcLoxRunnerError- if scanning, parsing, resolution, or execution fails
-