PtcRunner.Interpreter (PtcRunner v0.2.0)
View SourceInterprets and evaluates AST nodes.
Recursively evaluates operations by dispatching to the Operations module.
Summary
Functions
Evaluates an AST node in a given context.
Functions
@spec eval(map(), PtcRunner.Context.t()) :: {:ok, any()} | {:error, {atom(), String.t()}}
Evaluates an AST node in a given context.
Arguments
- node: The AST node to evaluate
- context: The execution context
Returns
{:ok, result}on success{:error, reason}on failure