Tenyaeva_lib.InterpreterCopyright 2025, Tenyaeva Ekaterina
SPDX-License-Identifier: LGPL-3.0-or-later
type eval_error = | TypeErrorRepresents a type error that occurs when a type mismatch is detected in an expression.
*)| DivisionByZeroRepresents the error that occurs when attempting to perform a division by zero operation.
*)| MatchFailureRepresents a match error occurs when a pattern matching attempt fails.
*)| NoVariable of Ast.identRepresents an error that occurs when attempting to use a variable that has not been declared or initialized.
*)| OutOfStepsRepresents an error that occurs when the permissible number of interpretation steps is exceeded.
*)type value = | ValInt of int| ValBool of bool| ValUnit| ValFun of Ast.rec_flag * Ast.pattern * Ast.expression * environment| ValFunction of Ast.case list * environment| ValOption of value option| ValBuiltin of Ast.identval pp_value : Stdlib.Format.formatter -> value -> unitval pp_eval_error : Stdlib.Format.formatter -> eval_error -> unitval run_interpreter :
Ast.structure ->
int ->
((Ast.ident option * value) list, eval_error) Stdlib.Result.t