forked from babel/babylon
-
Notifications
You must be signed in to change notification settings - Fork 5
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
ASI for new
#11
Merged
rattrayalex
merged 2 commits into
lightscript:lightscript
from
wcjohnson:upstream/asi-new
Apr 12, 2017
Merged
ASI for new
#11
rattrayalex
merged 2 commits into
lightscript:lightscript
from
wcjohnson:upstream/asi-new
Apr 12, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I believe this fix is correct but looking for more fixtures/edge cases here. |
rattrayalex
reviewed
Apr 12, 2017
src/parser/expression.js
Outdated
if (this.eat(tt.parenL)) { | ||
node.arguments = this.parseExprList(tt.parenR); | ||
this.toReferencedList(node.arguments); | ||
if (this.match(tt.parenL)) { |
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.
// lightscript ASI: don't parse as arg list if on a different line
if (!(this.hasPlugin("lightscript") && this.isLineBreak()) && this.eat(tt.parenL)) {
Awesome, thanks so much! |
wcjohnson
referenced
this pull request
in wcjohnson/babylon-lightscript
Apr 13, 2017
commit f995ec8 Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 16:04:31 2017 -0700 Require semicolon or newline after do-while commit 4bb0af9 Author: Alex Rattray <rattray.alex@gmail.com> Date: Sun Apr 9 17:08:36 2017 -0700 Allow paren expressions in if etc more flexibly commit 15eae1c Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 13:23:33 2017 -0700 Revert "Allow paren expressions in if etc" This reverts commit e506d96. commit 290de63 Author: William C. Johnson <wcjohnson@users.noreply.github.com> Date: Wed Apr 12 16:20:58 2017 -0400 ASI for `new` (#11) commit e506d96 Author: Alex Rattray <rattray.alex@gmail.com> Date: Sun Apr 9 17:08:36 2017 -0700 Allow paren expressions in if etc commit a7d60a7 Author: William C. Johnson <wcjohnson@users.noreply.github.com> Date: Sun Apr 9 15:07:38 2017 -0400 Allow empty arrow bodies (#9)
wcjohnson
referenced
this pull request
in wcjohnson/babylon-lightscript
Apr 15, 2017
commit 8e42d49cde4bf06b36f337841fc44f74217e70fb Author: William C. Johnson <wcjohnson@oigroup.net> Date: Sat Apr 15 18:13:58 2017 -0400 Update fixtures commit 768981805c00d1b695253d96f52e706a7bd8d991 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Sat Apr 15 18:09:07 2017 -0400 `if` significant whitespace commit bfa1aa8 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Sat Apr 15 17:56:50 2017 -0400 - Add parser state stack - Use stack to track `if` blocks and match alternate blocks correctly - catch out-of-place `elif` keywords - Add fixtures commit e431800 Author: William C. Johnson <wcjohnson@users.noreply.github.com> Date: Sat Apr 15 15:08:00 2017 -0400 `if`: parse nonblock consequents (lightscript#15) commit 80e9220 Author: Alex Rattray <rattray.alex@gmail.com> Date: Fri Apr 14 18:16:18 2017 -0700 Disallow newline between `else` and `if` commit 870b210 Author: Alex Rattray <rattray.alex@gmail.com> Date: Fri Apr 14 12:39:50 2017 -0700 0.5.0 commit 3488121 Author: Alex Rattray <rattray.alex@gmail.com> Date: Fri Apr 14 12:39:12 2017 -0700 Update yarn.lock commit c002833 Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 19:01:31 2017 -0700 Disallow newline after if, switch, with, while commit 821f484 Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 18:04:10 2017 -0700 Enforce consistent indentLevel with do-while commit 78bc60e Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 17:29:11 2017 -0700 Unify IfStatement and IfExpression, fix whitespace commit 3e1b767 Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 18:26:35 2017 -0700 Fix ASI failure in NamedArrowFunction commit f995ec8 Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 16:04:31 2017 -0700 Require semicolon or newline after do-while commit 4bb0af9 Author: Alex Rattray <rattray.alex@gmail.com> Date: Sun Apr 9 17:08:36 2017 -0700 Allow paren expressions in if etc more flexibly commit 15eae1c Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 13:23:33 2017 -0700 Revert "Allow paren expressions in if etc" This reverts commit e506d96. commit 290de63 Author: William C. Johnson <wcjohnson@users.noreply.github.com> Date: Wed Apr 12 16:20:58 2017 -0400 ASI for `new` (#11) commit e506d96 Author: Alex Rattray <rattray.alex@gmail.com> Date: Sun Apr 9 17:08:36 2017 -0700 Allow paren expressions in if etc commit a7d60a7 Author: William C. Johnson <wcjohnson@users.noreply.github.com> Date: Sun Apr 9 15:07:38 2017 -0400 Allow empty arrow bodies (#9) commit 8cfeb02d65a815ae123bfdab6ad5278b42c5e7e2 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Sat Apr 15 14:17:40 2017 -0400 Update fixture commit ab35f57b00a31620b4c77c921afbfe4638172124 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Sat Apr 15 14:17:33 2017 -0400 `if`: parse nonblock consequents correctly commit 751967ac170f08b14fd58239af4446ce67f090b7 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Sat Apr 15 14:16:20 2017 -0400 Update fixture commit ce4c5de25d57c09a79c042db5c96fa96bad8e7af Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 21:53:50 2017 -0400 Fixture updates commit 277e8d61ed8f17b8bfa7d0d5123754b73a195f15 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 21:49:22 2017 -0400 Disallow newline after if, switch, while, with commit ba0b8fcfe6854b2495c644caf5c2c51fd528534f Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 21:42:42 2017 -0400 Merge do-while indent matching commit 24c1588a1653386e5a6c76cbbc91e302167d0402 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 21:38:40 2017 -0400 Vanilla if test fixtures commit 7fc2bd4c90a8ae1de12fd08890e2577463593786 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 21:24:04 2017 -0400 Fix for Illegal else/if split commit ec54ef566efd25bb2d2b41e110e64c7baf504ef4 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 21:05:53 2017 -0400 Bulk merge 1: if syntax commit 531c4766ea6b767d05e1bbc822f8e2afb7d5d399 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 19:44:10 2017 -0400 Merge 0.5 if-parsing pathway commit eb62784f053f380f25aac3d1dc38455b765a5325 Author: Alex Rattray <rattray.alex@gmail.com> Date: Wed Apr 12 18:26:35 2017 -0700 Fix ASI failure in NamedArrowFunction commit 7da8df4b49807c3409c665755087ea133a361cc5 Author: William C. Johnson <wcjohnson@oigroup.net> Date: Fri Apr 14 19:34:44 2017 -0400 Revert "ASI for named arrows" This reverts commit c286877.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes ASI for
new