-
Notifications
You must be signed in to change notification settings - Fork 463
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
Cleanup pipe: remove |.u
and change "|." to "->" to represent pipe.
#7244
Conversation
|.u
which is effectively treated the same as `…|.u
and change "|." to "->" to represent pipe.
@cknitt @zth any idea if someone in a ppx might be relying on pipe being represented as "|."? Seems unlikely but just double checking. |
I think PPXes do rely on that, yes. So doing a transform would be good. I envision all of the major PPXes in the ecosystem moving to the proper ReScript AST once we've cleaned it up and are ready for consumption. |
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.
Looks great! Just the question about the PPX transform.
Nice! I also think that we should transform to |
BTW what about the other operators here? let printBinaryOperator = (~inlineRhs, operator) => {
let operatorTxt = switch operator {
| "|." => "->"
| "^" => "++"
| "=" => "=="
| "==" => "==="
| "<>" => "!="
| "!=" => "!=="
| txt => txt
}
... Should we also change them in the AST? |
1c0ae3c
to
ea96a31
Compare
AST cleanup: remove "|." and rename "|." to "->" in the internal representation for the pipe operator.