Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow module block to start a member expression (#13573)
* Accept module in primaryExpression * Add module blocks to primaryExpression * Fix package.json * Fix yarn.lock * Fix yarn.lock * Remove package.tgz file
- Loading branch information
Showing
4 changed files
with
48 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
"plugins": [ | ||
"doExpressions" | ||
] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...arser/test/fixtures/experimental/module-blocks/module-block-in-member-expression/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 @@ | ||
module {}.foo |
39 changes: 39 additions & 0 deletions
39
...er/test/fixtures/experimental/module-blocks/module-block-in-member-expression/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,39 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"expression": { | ||
"type": "MemberExpression", | ||
"start":0,"end":13,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":13}}, | ||
"object": { | ||
"type": "ModuleExpression", | ||
"start":0,"end":9,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":9}}, | ||
"body": { | ||
"type": "Program", | ||
"start":8,"end":9,"loc":{"start":{"line":1,"column":8},"end":{"line":1,"column":9}}, | ||
"sourceType": "module", | ||
"interpreter": null, | ||
"body": [], | ||
"directives": [] | ||
} | ||
}, | ||
"computed": false, | ||
"property": { | ||
"type": "Identifier", | ||
"start":10,"end":13,"loc":{"start":{"line":1,"column":10},"end":{"line":1,"column":13},"identifierName":"foo"}, | ||
"name": "foo" | ||
} | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |