Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@

#### :house: Internal

- Remove the S-expression parsetree printer (`res_parser -print sexp`). https://github.com/rescript-lang/rescript/pull/8803
Comment thread
cknitt marked this conversation as resolved.
- Use one set of OCaml warning flags for the whole repository, including the editor analysis and tools. https://github.com/rescript-lang/rescript/pull/8796
- Remove the unused `Packed` and `Partial_class_expr` constructors from the `.cmt` format and bump its magic number. https://github.com/rescript-lang/rescript/pull/8793
- Make `dict` an abstract type instead of a record with a hidden field. https://github.com/rescript-lang/rescript/pull/8752
Expand Down
10 changes: 4 additions & 6 deletions compiler/syntax/cli/res_cli.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ end = struct
NOT use it in production**!\n\n"
^ "Usage:\n res_parser <options> <file>\n\n" ^ "Examples:\n"
^ " res_parser myFile.res\n" ^ " res_parser -print ml myFile.res\n"
^ " res_parser -print sexp -interface myFile.resi\n\n" ^ "Options are:"
^ " res_parser -print ast -interface myFile.resi\n\n" ^ "Options are:"

let spec =
[
("-recover", Arg.Unit (fun () -> recover := true), "Emit partial ast");
( "-print",
Arg.String (fun txt -> print := txt),
"Print either ml, ast, sexp, comments, tokens, doc or res. Default: res"
);
"Print either ml, ast, comments, tokens, doc or res. Default: res" );
( "-width",
Arg.Int (fun w -> width := w),
"Specify the line length for the printer (formatter)" );
Expand Down Expand Up @@ -77,15 +76,14 @@ module Cli_arg_processor = struct
match target with
| "ml" -> Res_driver_ml_printer.print_engine
| "ast" -> Res_ast_debugger.print_engine
| "sexp" -> Res_ast_debugger.sexp_print_engine
| "comments" -> Res_ast_debugger.comments_print_engine
| "tokens" -> Res_token_debugger.token_print_engine
| "res" -> Res_driver.print_engine
| "doc" -> Res_ast_debugger.doc_print_engine
| target ->
print_endline
("-print needs to be either ml, ast, sexp, comments, tokens, doc or \
res. You provided " ^ target);
("-print needs to be either ml, ast, comments, tokens, doc or res. \
You provided " ^ target);
exit 1
in

Expand Down
Loading
Loading