swc/crates/swc_ecma_parser/tests/tsc/parserRegularExpression5.json

109 lines
2.4 KiB
JSON
Raw Normal View History

{
"type": "Script",
"span": {
"start": 0,
"end": 45,
"ctxt": 0
},
"body": [
{
"type": "IfStatement",
"span": {
"start": 0,
"end": 45,
"ctxt": 0
},
"test": {
"type": "Identifier",
"span": {
"start": 4,
"end": 5,
"ctxt": 0
},
"value": "a",
"optional": false
},
"consequent": {
"type": "ExpressionStatement",
"span": {
"start": 7,
"end": 45,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 7,
"end": 44,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 7,
"end": 36,
"ctxt": 0
},
"object": {
"type": "RegExpLiteral",
"span": {
"start": 7,
"end": 30,
"ctxt": 0
},
"pattern": " (\\\\ ? | & ) rct = j ",
"flags": ""
},
"property": {
"type": "Identifier",
"span": {
"start": 32,
"end": 36,
"ctxt": 0
},
"value": "test",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "MemberExpression",
"span": {
"start": 37,
"end": 43,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 37,
"end": 38,
"ctxt": 0
},
"value": "c",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 39,
"end": 43,
"ctxt": 0
},
"value": "href",
"optional": false
}
}
}
],
"typeArguments": null
}
},
"alternate": null
}
],
"interpreter": null
}