-
Notifications
You must be signed in to change notification settings - Fork 107
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
Pipeline + arrow function grammar #60
Comments
Cc @waldemarhowat @jridgewell @hzoo @gilbert |
Is this the parenthesis vs no parenthesis thing we talked about? If so we can lock down how Babylon parses it. |
Not sure if there's an issue for this already, or if this is a bug with babel, but I'm having an issue with the opposite. This: const RightReaderPromise = a => (a |> Either.Right |> ReaderPromise.of); Gives: return a |> _monet.Either.Right |> _readerPromise2.default.of;
^
SyntaxError: Unexpected token > |
It's a bug with your babel setup, you have to enable the transform. This is not the right thread for that. |
Closing this issue, as the proposal has advanced to stage 2 with Hack-style syntax. We're still working on the precise details of some precedence issues, but at least putting arrow functions in pipe bodies is a lot less common of a thing to do now, so it's a much smaller issue. |
In the explained and babel implementation, cases like
x |> y => z
are permitted. The current grammar does not permit these, throwing a syntax error. It seems like a useful case, but I haven't figured out how to spec it.The text was updated successfully, but these errors were encountered: