Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1acd0e6
commit af8686c
Showing
4 changed files
with
148 additions
and
0 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
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/experimental/import-reflection/comments/input.mjs
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 @@ | ||
/* 0 */ import /* 1 */ module /* 2 */ Foo /* 3 */ from /* 4 */ "foo" /* 5 */; |
112 changes: 112 additions & 0 deletions
112
packages/babel-parser/test/fixtures/experimental/import-reflection/comments/output.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,112 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":77,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":77,"index":77}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":77,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":77,"index":77}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ImportDeclaration", | ||
"start":8,"end":77,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":1,"column":77,"index":77}}, | ||
"module": true, | ||
"specifiers": [ | ||
{ | ||
"type": "ImportDefaultSpecifier", | ||
"start":38,"end":41,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":41,"index":41}}, | ||
"local": { | ||
"type": "Identifier", | ||
"start":38,"end":41,"loc":{"start":{"line":1,"column":38,"index":38},"end":{"line":1,"column":41,"index":41},"identifierName":"Foo"}, | ||
"name": "Foo" | ||
}, | ||
"trailingComments": [ | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 3 ", | ||
"start":42,"end":49,"loc":{"start":{"line":1,"column":42,"index":42},"end":{"line":1,"column":49,"index":49}} | ||
} | ||
], | ||
"leadingComments": [ | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 2 ", | ||
"start":30,"end":37,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":37,"index":37}} | ||
} | ||
] | ||
} | ||
], | ||
"source": { | ||
"type": "StringLiteral", | ||
"start":63,"end":68,"loc":{"start":{"line":1,"column":63,"index":63},"end":{"line":1,"column":68,"index":68}}, | ||
"extra": { | ||
"rawValue": "foo", | ||
"raw": "\"foo\"" | ||
}, | ||
"value": "foo", | ||
"trailingComments": [ | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 5 ", | ||
"start":69,"end":76,"loc":{"start":{"line":1,"column":69,"index":69},"end":{"line":1,"column":76,"index":76}} | ||
} | ||
], | ||
"leadingComments": [ | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 4 ", | ||
"start":55,"end":62,"loc":{"start":{"line":1,"column":55,"index":55},"end":{"line":1,"column":62,"index":62}} | ||
} | ||
] | ||
}, | ||
"innerComments": [ | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 1 ", | ||
"start":15,"end":22,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":22,"index":22}} | ||
} | ||
], | ||
"leadingComments": [ | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 0 ", | ||
"start":0,"end":7,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":7,"index":7}} | ||
} | ||
] | ||
} | ||
], | ||
"directives": [] | ||
}, | ||
"comments": [ | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 0 ", | ||
"start":0,"end":7,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":7,"index":7}} | ||
}, | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 1 ", | ||
"start":15,"end":22,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":22,"index":22}} | ||
}, | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 2 ", | ||
"start":30,"end":37,"loc":{"start":{"line":1,"column":30,"index":30},"end":{"line":1,"column":37,"index":37}} | ||
}, | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 3 ", | ||
"start":42,"end":49,"loc":{"start":{"line":1,"column":42,"index":42},"end":{"line":1,"column":49,"index":49}} | ||
}, | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 4 ", | ||
"start":55,"end":62,"loc":{"start":{"line":1,"column":55,"index":55},"end":{"line":1,"column":62,"index":62}} | ||
}, | ||
{ | ||
"type": "CommentBlock", | ||
"value": " 5 ", | ||
"start":69,"end":76,"loc":{"start":{"line":1,"column":69,"index":69},"end":{"line":1,"column":76,"index":76}} | ||
} | ||
] | ||
} |