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

Allow yield indented object #5072

Merged
merged 3 commits into from
Jun 11, 2018

Conversation

helixbass
Copy link
Collaborator

Fixes #5054

Follows the same pattern as eg #4599 to allow yield to take an indented object


do ->
y =
if no then await
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to go in the async file, so that the tests pass in Node 6.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@GeoffreyBooth ok moved to test/async.coffee

@@ -818,6 +819,7 @@ grammar =
o '+ Expression', (-> new Op '+', $2), prec: 'UNARY_MATH'

o 'AWAIT Expression', -> new Op $1 , $2
o 'AWAIT INDENT Object OUTDENT', -> new Op $1 , $3
Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay this is a total nit, but why is there a space before this comma? And on the previous line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@GeoffreyBooth guessing the previous line was originally copied from eg the UNARY Expression line, which contains an extra space to align with following. Updated

@GeoffreyBooth
Copy link
Collaborator

Looks good to me. @zdenko or anyone else have any notes?

@GeoffreyBooth GeoffreyBooth merged commit 70f6cb7 into jashkenas:master Jun 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants