-
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
Allow yield indented object #5072
Allow yield indented object #5072
Conversation
test/formatting.coffee
Outdated
|
||
do -> | ||
y = | ||
if no then await |
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.
This needs to go in the async file, so that the tests pass in Node 6.
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.
@GeoffreyBooth ok moved to test/async.coffee
src/grammar.coffee
Outdated
@@ -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 |
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.
Okay this is a total nit, but why is there a space before this comma? And on the previous line.
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.
@GeoffreyBooth guessing the previous line was originally copied from eg the UNARY Expression
line, which contains an extra space to align with following. Updated
Looks good to me. @zdenko or anyone else have any notes? |
Fixes #5054
Follows the same pattern as eg #4599 to allow
yield
to take an indented object