Parse let declarations whose id starts with \ (#13325)
This commit is contained in:
1
packages/babel-parser/test/fixtures/es2015/let/let-declaration-escape-id/input.js
vendored
Normal file
1
packages/babel-parser/test/fixtures/es2015/let/let-declaration-escape-id/input.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
let \u0275ResourceLoaderImpl_BaseFactory
|
||||
30
packages/babel-parser/test/fixtures/es2015/let/let-declaration-escape-id/output.json
vendored
Normal file
30
packages/babel-parser/test/fixtures/es2015/let/let-declaration-escape-id/output.json
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "VariableDeclaration",
|
||||
"start":0,"end":40,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":40}},
|
||||
"declarations": [
|
||||
{
|
||||
"type": "VariableDeclarator",
|
||||
"start":4,"end":40,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":40}},
|
||||
"id": {
|
||||
"type": "Identifier",
|
||||
"start":4,"end":40,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":40},"identifierName":"ɵResourceLoaderImpl_BaseFactory"},
|
||||
"name": "ɵResourceLoaderImpl_BaseFactory"
|
||||
},
|
||||
"init": null
|
||||
}
|
||||
],
|
||||
"kind": "let"
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
2
packages/babel-parser/test/fixtures/es2015/let/let-expression-followed-by-escape/input.js
vendored
Normal file
2
packages/babel-parser/test/fixtures/es2015/let/let-expression-followed-by-escape/input.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
1 + let
|
||||
\u0275ResourceLoaderImpl_BaseFactory
|
||||
45
packages/babel-parser/test/fixtures/es2015/let/let-expression-followed-by-escape/output.json
vendored
Normal file
45
packages/babel-parser/test/fixtures/es2015/let/let-expression-followed-by-escape/output.json
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"type": "File",
|
||||
"start":0,"end":44,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":36}},
|
||||
"program": {
|
||||
"type": "Program",
|
||||
"start":0,"end":44,"loc":{"start":{"line":1,"column":0},"end":{"line":2,"column":36}},
|
||||
"sourceType": "script",
|
||||
"interpreter": null,
|
||||
"body": [
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":0,"end":7,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":7}},
|
||||
"expression": {
|
||||
"type": "BinaryExpression",
|
||||
"start":0,"end":7,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":7}},
|
||||
"left": {
|
||||
"type": "NumericLiteral",
|
||||
"start":0,"end":1,"loc":{"start":{"line":1,"column":0},"end":{"line":1,"column":1}},
|
||||
"extra": {
|
||||
"rawValue": 1,
|
||||
"raw": "1"
|
||||
},
|
||||
"value": 1
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"type": "Identifier",
|
||||
"start":4,"end":7,"loc":{"start":{"line":1,"column":4},"end":{"line":1,"column":7},"identifierName":"let"},
|
||||
"name": "let"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ExpressionStatement",
|
||||
"start":8,"end":44,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":36}},
|
||||
"expression": {
|
||||
"type": "Identifier",
|
||||
"start":8,"end":44,"loc":{"start":{"line":2,"column":0},"end":{"line":2,"column":36},"identifierName":"ɵResourceLoaderImpl_BaseFactory"},
|
||||
"name": "ɵResourceLoaderImpl_BaseFactory"
|
||||
}
|
||||
}
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user