Files
Nicolò RibaudoandGitHub 2ce6340776 Remove length restriction from JSX entities, and ignore Object.prototype (#14327)
* Allow any length in unicode CP jsx entities

* Add failing test

* Don't access entities from Object.prototype

* Add `&#0_0;` test

* Fix `�` parsing
2022-03-06 10:00:25 +01:00

53 lines
2.2 KiB
JSON

{
"type": "File",
"start":0,"end":112,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":112}},
"program": {
"type": "Program",
"start":0,"end":112,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":112}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ExpressionStatement",
"start":0,"end":112,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":112}},
"expression": {
"type": "JSXElement",
"start":0,"end":112,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":4,"index":112}},
"openingElement": {
"type": "JSXOpeningElement",
"start":0,"end":3,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":3,"index":3}},
"name": {
"type": "JSXIdentifier",
"start":1,"end":2,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":2,"index":2}},
"name": "a"
},
"attributes": [],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"start":108,"end":112,"loc":{"start":{"line":7,"column":0,"index":108},"end":{"line":7,"column":4,"index":112}},
"name": {
"type": "JSXIdentifier",
"start":110,"end":111,"loc":{"start":{"line":7,"column":2,"index":110},"end":{"line":7,"column":3,"index":111}},
"name": "a"
}
},
"children": [
{
"type": "JSXText",
"start":3,"end":108,"loc":{"start":{"line":1,"column":3,"index":3},"end":{"line":7,"column":0,"index":108}},
"extra": {
"rawValue": "\n Ӓ\n ઼\n Ӓ\n ઼\n \u0000\n",
"raw": "\n Ӓ\n ઼\n &#00000000000000000000001234;\n &#x0000000000000000000000ABC;\n �\n"
},
"value": "\n Ӓ\n ઼\n Ӓ\n ઼\n \u0000\n"
}
]
}
}
],
"directives": []
}
}