pub fn eval_program(
env: &EnvRef,
ast: Program,
) -> Result<(EnvRef, Rc<Value>), Error>
Expand description
Probably the most important function in the whole program, the main entry point of the SAP interpreter. It performs the actual execution of a program, returning a final result.
§Arguments
env
- AnEnvRef
representing the starting global environment. Data may be inserted ahead of time.ast
- An AST root (Program
) node representing the program that is to be executed.
§Returns
Either an Ok
containing a tuple