Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support more inner comments (#15008)
Co-authored-by: Nicol貌 Ribaudo <nicolo.ribaudo@gmail.com>
- Loading branch information
1 parent
a5665cf
commit c88e511
Showing
22 changed files
with
126 additions
and
46 deletions.
There are no files selected for viewing
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
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
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
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/async-do-expressions/inner-comments/input.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 @@ | ||
async /* 1 */ do /* 2 */ { /* 3 */ } |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/async-do-expressions/inner-comments/output.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 @@ | ||
async /* 1 */ do /* 2 */{/* 3 */}; |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/comments/arrow-single-param-comment/input.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 @@ | ||
(x)/* 1 */=>{} |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/comments/arrow-single-param-comment/output.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 @@ | ||
x /* 1 */=> {}; |
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/comments/async-class-method-comment/input.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,3 @@ | ||
class C { | ||
async /* 1 */ foo(/* 2 */) /* 3 */ {} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/comments/async-class-method-comment/output.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,3 @@ | ||
class C { | ||
async /* 1 */foo( /* 2 */) /* 3 */{} | ||
} |
3 changes: 3 additions & 0 deletions
3
...s/babel-generator/test/fixtures/comments/async-class-method-computed-key-comment/input.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,3 @@ | ||
class C { | ||
async /* 1 */ [ /* 2 */ foo /* 3 */] /* 4 */ (/* 5 */) {} | ||
} |
3 changes: 3 additions & 0 deletions
3
.../babel-generator/test/fixtures/comments/async-class-method-computed-key-comment/output.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,3 @@ | ||
class C { | ||
async [/* 2 */foo /* 3 */] /* 1 */ /* 4 */ /* 5 */() {} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ages/babel-generator/test/fixtures/comments/async-generator-class-method-comment/input.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,3 @@ | ||
class C { | ||
async /* 1 */ * /* 2 */ foo /* 3 */ (/* 4 */) /* 5 */ {} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ges/babel-generator/test/fixtures/comments/async-generator-class-method-comment/output.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,3 @@ | ||
class C { | ||
async /* 1 */ /* 4 */* /* 2 */foo /* 3 */() /* 5 */{} | ||
} |
3 changes: 3 additions & 0 deletions
3
...nerator/test/fixtures/comments/async-generator-class-method-computed-key-comment/input.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,3 @@ | ||
class C { | ||
async /* 1 */ * /* 2 */ [ /* 3 */ foo /* 4 */] /* 5 */ (/* 6 */) {} | ||
} |
3 changes: 3 additions & 0 deletions
3
...erator/test/fixtures/comments/async-generator-class-method-computed-key-comment/output.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,3 @@ | ||
class C { | ||
async /* 1 */ /* 2 */ /* 5 */ /* 6 */*[/* 3 */foo /* 4 */]() {} | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/comments/import-assertion-inner-comment/input.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 @@ | ||
import "foo" /* 1 */ assert /* 2 */ { type: "json" } |
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/comments/import-assertion-inner-comment/options.json
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,3 @@ | ||
{ | ||
"plugins": ["importAssertions"] | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-generator/test/fixtures/comments/import-assertion-inner-comment/output.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 @@ | ||
import "foo" /* 1 */ assert /* 2 */{ type: "json" }; |
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/comments/yield-star-inner-comment/input.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,3 @@ | ||
function * loop() { | ||
yield /* 1 */ * /* 2 */ loop(); | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/babel-generator/test/fixtures/comments/yield-star-inner-comment/output.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,3 @@ | ||
function* loop() { | ||
yield /* 1 */* /* 2 */loop(); | ||
} |