-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
Builtin JSX (Javascript XML) support in Meriyah is great but there is no proper lexical analysis going on. For example, meriyah thinks this is a valid JSX:
<hey=""></hey>
and the output is
{
"type": "Program",
"sourceType": "script",
"body": [
{
"type": "ExpressionStatement",
"expression": {
"type": "JSXElement",
"children": [],
"openingElement": {
"type": "JSXOpeningElement",
"name": {
"type": "JSXIdentifier",
"name": "hey"
},
"attributes": [
{
"type": "JSXAttribute",
"value": null,
"name": {
"type": "JSXIdentifier",
"name": "hey"
}
},
{
"type": "JSXAttribute",
"value": null,
"name": {
"type": "JSXIdentifier",
"name": ""
}
}
],
"selfClosing": false
},
"closingElement": {
"type": "JSXClosingElement",
"name": {
"type": "JSXIdentifier",
"name": "hey"
}
}
}
}
]
}
These ones also work even though they shouldn't:
<div=1></div>
<div=test></div>
<div=div></div>
<div=/>
<div=-/>
<div=+-%&([)]}.../>
Metadata
Metadata
Assignees
Labels
No labels