swc/crates/swc_ecma_parser/tests/js/jssue-7428/1/input.js.json
Donny/강동윤 1cab43f17d
fix(es/parser): Reset class context (#7433)
**Related issue:**

 - Closes #7428.
2023-05-23 05:28:56 +00:00

223 lines
5.7 KiB
JSON

{
"type": "Script",
"span": {
"start": 1,
"end": 100,
"ctxt": 0
},
"body": [
{
"type": "ClassDeclaration",
"identifier": {
"type": "Identifier",
"span": {
"start": 7,
"end": 8,
"ctxt": 0
},
"value": "T",
"optional": false
},
"declare": false,
"span": {
"start": 1,
"end": 100,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 15,
"end": 32,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 15,
"end": 16,
"ctxt": 0
},
"value": "f",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 15,
"end": 32,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 19,
"end": 32,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 21,
"end": 30,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 21,
"end": 30,
"ctxt": 0
},
"value": "arguments",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
},
{
"type": "ClassProperty",
"span": {
"start": 38,
"end": 98,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 45,
"end": 46,
"ctxt": 0
},
"value": "f",
"optional": false
},
"value": {
"type": "ClassExpression",
"identifier": null,
"span": {
"start": 49,
"end": 98,
"ctxt": 0
},
"decorators": [],
"body": [
{
"type": "ClassMethod",
"span": {
"start": 75,
"end": 92,
"ctxt": 0
},
"key": {
"type": "Identifier",
"span": {
"start": 75,
"end": 76,
"ctxt": 0
},
"value": "x",
"optional": false
},
"function": {
"params": [],
"decorators": [],
"span": {
"start": 75,
"end": 92,
"ctxt": 0
},
"body": {
"type": "BlockStatement",
"span": {
"start": 79,
"end": 92,
"ctxt": 0
},
"stmts": [
{
"type": "ExpressionStatement",
"span": {
"start": 81,
"end": 90,
"ctxt": 0
},
"expression": {
"type": "Identifier",
"span": {
"start": 81,
"end": 90,
"ctxt": 0
},
"value": "arguments",
"optional": false
}
}
]
},
"generator": false,
"async": false,
"typeParameters": null,
"returnType": null
},
"kind": "method",
"isStatic": false,
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false
}
],
"superClass": {
"type": "Identifier",
"span": {
"start": 63,
"end": 64,
"ctxt": 0
},
"value": "T",
"optional": false
},
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
},
"typeAnnotation": null,
"isStatic": true,
"decorators": [],
"accessibility": null,
"isAbstract": false,
"isOptional": false,
"isOverride": false,
"readonly": false,
"declare": false,
"definite": false
}
],
"superClass": null,
"isAbstract": false,
"typeParams": null,
"superTypeParams": null,
"implements": []
}
],
"interpreter": null
}