Skip to content
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

Merged
merged 3 commits into from May 13, 2024

Conversation

DZakh
Copy link
Contributor

@DZakh DZakh commented Apr 27, 2024

continue ; -> continue;
And remove unused label-related code

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
Copy link
Contributor Author

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cknitt @zth What do you think?

Copy link
Member

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:

S.while_ (* ~label:continue_label *) E.true_

I don't know if we might want to use this feature in the future.
@cristianoc What do you think?

Copy link
Collaborator

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.

@@ -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
Copy link
Contributor Author

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.

@zth
Copy link
Collaborator

zth commented Apr 28, 2024

CI fails?

@cknitt
Copy link
Member

cknitt commented May 3, 2024

@DZakh could you rebase?

@DZakh DZakh requested review from cknitt and zth May 10, 2024 20:48
@cknitt
Copy link
Member

cknitt commented May 11, 2024

Great! Could you add a CHANGELOG entry?

@DZakh
Copy link
Contributor Author

DZakh commented May 11, 2024

Done

@cknitt cknitt merged commit aee06c0 into rescript-lang:master May 13, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants