Skip to content

Commit

Permalink
better for codegen formatting (#1275)
Browse files Browse the repository at this point in the history
* better `for` codegen formatting

* fix tests

* chore: add changelog entry
  • Loading branch information
anmonteiro authored Jan 6, 2025
1 parent 61a6ed1 commit 293ba2b
Show file tree
Hide file tree
Showing 76 changed files with 262 additions and 258 deletions.
2 changes: 2 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ Unreleased
- BREAKING: ppx: print the `deprecated` alert for `@@deriving abstract` at the
declaration site rather than at (all) usages
([#1269](https://github.com/melange-re/melange/pull/1269))
- core: prettify melange code generation for `for` loops
([#1275](https://github.com/melange-re/melange/pull/1275))

4.0.1 2024-06-07
---------------
Expand Down
2 changes: 2 additions & 0 deletions jscomp/core/js_dump.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,7 @@ and statement_desc top cxt (s : J.statement_desc) : cxt =
group cxt 0 (fun () ->
(* The only place that [semi] may have semantics here *)
string cxt L.for_;
space cxt;
paren_group cxt 1 (fun () ->
let cxt, new_id =
match
Expand Down Expand Up @@ -1166,6 +1167,7 @@ and statement_desc top cxt (s : J.statement_desc) : cxt =
pp_direction cxt direction;
ident cxt id))
in
space cxt;
brace_block cxt s)
in
action cxt
Expand Down
2 changes: 1 addition & 1 deletion jscomp/test/dist/jscomp/test/406_primitive_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jscomp/test/dist/jscomp/test/array_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions jscomp/test/dist/jscomp/test/bal_set_mini.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions jscomp/test/dist/jscomp/test/bdd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions jscomp/test/dist/jscomp/test/bench.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions jscomp/test/dist/jscomp/test/bs_MapInt_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions jscomp/test/dist/jscomp/test/bs_array_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions jscomp/test/dist/jscomp/test/bs_hashmap_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions jscomp/test/dist/jscomp/test/bs_hashset_int_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions jscomp/test/dist/jscomp/test/bs_hashtbl_string_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jscomp/test/dist/jscomp/test/bs_list_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions jscomp/test/dist/jscomp/test/bs_map_set_dict_test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 293ba2b

Please sign in to comment.