Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip following empty statements in toSequenceExpression (#11724)
* fix: statementlist behavior * fixed prettier and babel-types/converter errors * added check for first node * remove node length check, only check if node is first * add reset eLU if proceeding is non-empty * fix failure for ci tests * remove .expressions since sequence expression isn't produced * changed test title
- Loading branch information
Showing
3 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/babel-plugin-proposal-do-expressions/test/fixtures/do-expressions/semicolons.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
expect(do { | ||
x = do { 1; }; | ||
}).toBe(1); | ||
|
||
expect(do { | ||
z = do { 1;;;; }; | ||
}).toBe(1) | ||
|
||
expect(do { | ||
w = (do { 1;;;; }); | ||
}).toBe(1); | ||
|
||
expect(do { | ||
k = do { ; }; | ||
}).toBe(undefined); |
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
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