-
Notifications
You must be signed in to change notification settings - Fork 464
Remove redundant space after continue
in generated file
#6743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove redundant space after continue
in generated file
#6743
Conversation
jscomp/core/j.ml
Outdated
@@ -263,7 +263,7 @@ and statement_desc = | |||
* for_direction | |||
* block | |||
* Js_closure.t | |||
| Continue of label | |||
| Continue of label option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that the label is not used for ReScript at all. Maybe I should remove it completely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't know that "continue with label" exists in JS. :-)
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/continue#using_continue_with_a_label
Usage of label
is currently commented out here:
https://github.com/rescript-lang/rescript-compiler/blob/9b00a0eeedff2db41d0559fbb3530f66919dcc5d/jscomp/core/lam_compile.ml#L366
I don't know if we might want to use this feature in the future.
@cristianoc What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like we could just add it back if we end up needing it. I didn't know it existed in JS either.
jscomp/core/js_fold.ml
Outdated
@@ -232,7 +232,7 @@ class fold = | |||
let _self = _self#block _x4 in | |||
_self | |||
| Continue _x0 -> | |||
let _self = _self#label _x0 in | |||
let _self = option (fun _self -> _self#label) _self _x0 in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what the code does, but I've done it the same way as for other variants and it compiled.
CI fails? |
@DZakh could you rebase? |
76c61b5
to
8af55ef
Compare
Great! Could you add a CHANGELOG entry? |
Done |
continue ;
->continue;
And remove unused
label
-related code