Skip to content

Allow yield indented object#5072

Merged
GeoffreyBooth merged 3 commits into
jashkenas:masterfrom
helixbass:yield-implicit-object
Jun 11, 2018
Merged

Allow yield indented object#5072
GeoffreyBooth merged 3 commits into
jashkenas:masterfrom
helixbass:yield-implicit-object

Conversation

@helixbass

Copy link
Copy Markdown
Collaborator

Fixes #5054

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

Comment thread test/formatting.coffee Outdated

do ->
y =
if no then await

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/grammar.coffee Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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