Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correctly check reserved word for PropertyDefinition: IdentifierRefer…
…ence (#11862) * fix: check IdentifierReference in PropertyDefinition * chore: add more test cases * fix: incorrect test title
- Loading branch information
Showing
18 changed files
with
330 additions
and
159 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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
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: 0 additions & 1 deletion
1
packages/babel-parser/test/fixtures/es2015/shorthand/1/input.js
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
packages/babel-parser/test/fixtures/es2015/shorthand/1/output.json
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
packages/babel-parser/test/fixtures/es2015/shorthand/2/input.js
This file was deleted.
Oops, something went wrong.
91 changes: 0 additions & 91 deletions
91
packages/babel-parser/test/fixtures/es2015/shorthand/2/output.json
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
packages/babel-parser/test/fixtures/es2015/shorthand/get-eval-arguments/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 @@ | ||
var x = ({ get, eval, arguments }); |
99 changes: 99 additions & 0 deletions
99
packages/babel-parser/test/fixtures/es2015/shorthand/get-eval-arguments/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,99 @@ | ||
{ | ||
"type": "File", | ||
"start":0,"end":35,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":35}}, | ||
"program": { | ||
"type": "Program", | ||
"start":0,"end":35,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":35}}, | ||
"sourceType": "script", | ||
"interpreter": null, | ||
"body": [ | ||
{ | ||
"type": "VariableDeclaration", | ||
"start":0,"end":35,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":35}}, | ||
"declarations": [ | ||
{ | ||
"type": "VariableDeclarator", | ||
"start":4,"end":34,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":34}}, | ||
"id": { | ||
"type": "Identifier", | ||
"start":4,"end":5,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":5},"identifierName":"x"}, | ||
"name": "x" | ||
}, | ||
"init": { | ||
"type": "ObjectExpression", | ||
"start":9,"end":33,"loc":{"start":{"line":1,"column":9},"end":{"line":1,"column":33}}, | ||
"properties": [ | ||
{ | ||
"type": "ObjectProperty", | ||
"start":11,"end":14,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":14}}, | ||
"method": false, | ||
"key": { | ||
"type": "Identifier", | ||
"start":11,"end":14,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":14},"identifierName":"get"}, | ||
"name": "get" | ||
}, | ||
"computed": false, | ||
"shorthand": true, | ||
"value": { | ||
"type": "Identifier", | ||
"start":11,"end":14,"loc":{"start":{"line":1,"column":11},"end":{"line":1,"column":14},"identifierName":"get"}, | ||
"name": "get" | ||
}, | ||
"extra": { | ||
"shorthand": true | ||
} | ||
}, | ||
{ | ||
"type": "ObjectProperty", | ||
"start":16,"end":20,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":20}}, | ||
"method": false, | ||
"key": { | ||
"type": "Identifier", | ||
"start":16,"end":20,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":20},"identifierName":"eval"}, | ||
"name": "eval" | ||
}, | ||
"computed": false, | ||
"shorthand": true, | ||
"value": { | ||
"type": "Identifier", | ||
"start":16,"end":20,"loc":{"start":{"line":1,"column":16},"end":{"line":1,"column":20},"identifierName":"eval"}, | ||
"name": "eval" | ||
}, | ||
"extra": { | ||
"shorthand": true | ||
} | ||
}, | ||
{ | ||
"type": "ObjectProperty", | ||
"start":22,"end":31,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":31}}, | ||
"method": false, | ||
"key": { | ||
"type": "Identifier", | ||
"start":22,"end":31,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":31},"identifierName":"arguments"}, | ||
"name": "arguments" | ||
}, | ||
"computed": false, | ||
"shorthand": true, | ||
"value": { | ||
"type": "Identifier", | ||
"start":22,"end":31,"loc":{"start":{"line":1,"column":22},"end":{"line":1,"column":31},"identifierName":"arguments"}, | ||
"name": "arguments" | ||
}, | ||
"extra": { | ||
"shorthand": true | ||
} | ||
} | ||
], | ||
"extra": { | ||
"parenthesized": true, | ||
"parenStart": 8 | ||
} | ||
} | ||
} | ||
], | ||
"kind": "var" | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
packages/babel-parser/test/fixtures/es2015/shorthand/reserved-word-strict/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,2 @@ | ||
"use strict"; | ||
var x = ({ implements, interface, package }); |
Oops, something went wrong.