Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat "await" as an invalid identifier (#4954)
It is valid (outside `async` functions) in the "script" parse goal, but always invalid in the "module" parse goal. Fixes #4952.
- Loading branch information
1 parent
ecc59bd
commit 5b6847c
Showing
4 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...s/babel-plugin-transform-es2015-function-name/test/fixtures/function-name/await/actual.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 @@ | ||
export {}; | ||
|
||
var obj = { await: function () {} }; |
3 changes: 3 additions & 0 deletions
3
...babel-plugin-transform-es2015-function-name/test/fixtures/function-name/await/expected.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 @@ | ||
export {}; | ||
|
||
var obj = { await: function _await() {} }; |
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