Skip to content

Commit

Permalink
✨ Add code location info
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeta611 committed Nov 28, 2024
1 parent 9656881 commit d95b99a
Show file tree
Hide file tree
Showing 7 changed files with 1,421 additions and 1,455 deletions.
10 changes: 5 additions & 5 deletions bin/native/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ let () =
in
Arg.parse speclist (fun x -> filename := x) usage_msg;
if String.is_empty !filename then Arg.usage speclist usage_msg
else if !opt_parse_js then (
let js_syntax, _ = Js_syntax.parse !filename in
print_endline (Js_syntax.show js_syntax);
let prog = Js_syntax.convert js_syntax in
Sexp.pp_hum Stdlib.Format.std_formatter (Syntax.Prog.sexp_of_t prog))
else if !opt_parse_js then failwith "Not implemented"
(* (let js_syntax, _ = Js_syntax.parse !filename in *)
(* print_endline (Js_syntax.show js_syntax); *)
(* let prog = Js_syntax.convert js_syntax in *)
(* Sexp.pp_hum Stdlib.Format.std_formatter (Syntax.Prog.sexp_of_t prog)) *)
else (
Fmt_tty.setup_std_outputs ();
Logs.set_reporter (Logs_fmt.reporter ());
Expand Down
2 changes: 1 addition & 1 deletion lib/interp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ end
let rec eval : type a. a Expr.t -> value =
fun expr ->
Logger.eval expr;
match expr with
match expr.desc with
| Const Unit -> Unit
| Const (Bool b) -> Bool b
| Const (Int i) -> Int i
Expand Down
Loading

0 comments on commit d95b99a

Please sign in to comment.