-
Notifications
You must be signed in to change notification settings - Fork 2k
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
How to deal with multiline code in loops #10
Labels
Comments
Indeed I think this is an oversight as well. I was thinking adding a pre-fix comprehension system like this:
|
Yes, great suggestion -- mirrors the multiline vs single-line whiles and ifs. I'll give it a shot. |
Alright, multiline block form is now on master for array and object comprehensions. Here's the (contrived) example from the tests.
Closing the ticket... |
alangpierce
added a commit
to alangpierce/coffeescript
that referenced
this issue
Oct 31, 2016
…ons (jashkenas#10) Closes decaffeinate/decaffeinate#458 Closes decaffeinate/decaffeinate#461 Closes decaffeinate/decaffeinate#504 Just like OUTDENT and CALL_END tokens, close-curly-brace tokens can be generated without having a real location, and if that position overlaps with a later token, it can cause the AST to have bad location data. Just like the other two token types, we now give `}` tokens the position of the previous real token, which makes all AST nodes have reasonable locations.
This issue was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How should I covert something like the following?
The only way I could figure with the array comprehensions was to pull out the multilines into a function, like so:
The text was updated successfully, but these errors were encountered: