-
Notifications
You must be signed in to change notification settings - Fork 428
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
Make external... = "" optional in reason syntax #2464
Make external... = "" optional in reason syntax #2464
Conversation
0dedc88
to
330c139
Compare
6984989
to
84a5b69
Compare
Great change! |
@romanschejbal I made another pass at this -- it seems that you still need to handle the Other than that this is really shaping up! |
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 think this is good to go.
@romanschejbal thanks again for working on this. I think a good next step could be to parse external x: ... = "";
into external x .. = "x"
and avoid having empty strings in the AST at all. I think this would get us rid of the bucklescript warnings.
Thanks to you for the intro and help! And yes, that makes total sense. I will look into it when I get some time. :-) |
bff9a1c
to
c949007
Compare
dfd42fc
to
02456e6
Compare
I think this one is now good to go. It removes those empty strings during parsing phase so we don't get bs warnings. Do you mind taking another look @anmonteiro ? And sorry if the rebase messed up the code-reviewing. Thanks |
Thank you for your contribution @romanschejbal ! |
In bs, bs.obj expect string to be empty, that's why I made such feature request. |
So what is the desired behavior? Should it default to empty if there is no string contents supplied? |
I do like the behavior of having |
See my comments on punning: it is fragile to refactoring (both for C and JS) |
Yes that's what's happening here. Anyway, I'm happy to create another PR rn that'll preserve the empty string if that's what you'll settle on. :) |
@romanschejbal thanks for looking into it. desired behavior
|
@bobzhang see the new PR pls, hope it's correct! :) |
Fixes #2422