mirror of
https://github.com/MorizzG/MLox.git
synced 2025-12-06 04:22:41 +00:00
print errors to stderr instead stdout
This commit is contained in:
parent
f30b0444e4
commit
e2fcb0f6ef
3 changed files with 22 additions and 25 deletions
|
|
@ -83,10 +83,7 @@ let rec interpret_stmt (env : environment) (stmt_node : stmt_node) : (unit, runt
|
|||
| Expr expr ->
|
||||
let* _ = interpret_expr env expr in
|
||||
Ok ()
|
||||
| Break ->
|
||||
(* print_endline "break!";
|
||||
Ok () (* TODO *) *)
|
||||
RuntimeError.break () |> Result.error
|
||||
| Break -> RuntimeError.break () |> Result.error
|
||||
| Continue -> RuntimeError.continue () |> Result.error
|
||||
| Print expr ->
|
||||
let* value = interpret_expr env expr in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue