mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
790a262c07
swc_babel_ast: - Rename as `swc_estree_ast`. swc_babel_compat: - Rename as `swc_estree_compat`. swc_babel_visit: - Rename as `swc_estree_visit`.
496 lines
14 KiB
JSON
496 lines
14 KiB
JSON
{
|
|
"type": "File",
|
|
"start": 0,
|
|
"end": 151,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 0
|
|
}
|
|
},
|
|
"errors": [],
|
|
"program": {
|
|
"type": "Program",
|
|
"start": 0,
|
|
"end": 151,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 8,
|
|
"column": 0
|
|
}
|
|
},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "ClassDeclaration",
|
|
"start": 0,
|
|
"end": 116,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 6,
|
|
"end": 15,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 6
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 15
|
|
},
|
|
"identifierName": "Rectangle"
|
|
},
|
|
"name": "Rectangle"
|
|
},
|
|
"superClass": null,
|
|
"body": {
|
|
"type": "ClassBody",
|
|
"start": 16,
|
|
"end": 116,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 16
|
|
},
|
|
"end": {
|
|
"line": 6,
|
|
"column": 1
|
|
}
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ClassMethod",
|
|
"start": 22,
|
|
"end": 114,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 4
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 5
|
|
}
|
|
},
|
|
"static": false,
|
|
"key": {
|
|
"type": "Identifier",
|
|
"start": 22,
|
|
"end": 33,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 4
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 15
|
|
},
|
|
"identifierName": "constructor"
|
|
},
|
|
"name": "constructor"
|
|
},
|
|
"computed": false,
|
|
"kind": "constructor",
|
|
"id": null,
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [
|
|
{
|
|
"type": "Identifier",
|
|
"start": 34,
|
|
"end": 40,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 16
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 22
|
|
},
|
|
"identifierName": "height"
|
|
},
|
|
"name": "height"
|
|
},
|
|
{
|
|
"type": "Identifier",
|
|
"start": 42,
|
|
"end": 47,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 24
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 29
|
|
},
|
|
"identifierName": "width"
|
|
},
|
|
"name": "width"
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start": 49,
|
|
"end": 114,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 31
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 5
|
|
}
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start": 59,
|
|
"end": 80,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 29
|
|
}
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"start": 59,
|
|
"end": 79,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 28
|
|
}
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"start": 59,
|
|
"end": 70,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 19
|
|
}
|
|
},
|
|
"object": {
|
|
"type": "ThisExpression",
|
|
"start": 59,
|
|
"end": 63,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 12
|
|
}
|
|
}
|
|
},
|
|
"computed": false,
|
|
"property": {
|
|
"type": "Identifier",
|
|
"start": 64,
|
|
"end": 70,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 13
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 19
|
|
},
|
|
"identifierName": "height"
|
|
},
|
|
"name": "height"
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"start": 73,
|
|
"end": 79,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 22
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 28
|
|
},
|
|
"identifierName": "height"
|
|
},
|
|
"name": "height"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "ExpressionStatement",
|
|
"start": 89,
|
|
"end": 108,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 27
|
|
}
|
|
},
|
|
"expression": {
|
|
"type": "AssignmentExpression",
|
|
"start": 89,
|
|
"end": 107,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 26
|
|
}
|
|
},
|
|
"operator": "=",
|
|
"left": {
|
|
"type": "MemberExpression",
|
|
"start": 89,
|
|
"end": 99,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 18
|
|
}
|
|
},
|
|
"object": {
|
|
"type": "ThisExpression",
|
|
"start": 89,
|
|
"end": 93,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 12
|
|
}
|
|
}
|
|
},
|
|
"computed": false,
|
|
"property": {
|
|
"type": "Identifier",
|
|
"start": 94,
|
|
"end": 99,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 13
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 18
|
|
},
|
|
"identifierName": "width"
|
|
},
|
|
"name": "width"
|
|
}
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"start": 102,
|
|
"end": 107,
|
|
"loc": {
|
|
"start": {
|
|
"line": 4,
|
|
"column": 21
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 26
|
|
},
|
|
"identifierName": "width"
|
|
},
|
|
"name": "width"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"start": 117,
|
|
"end": 150,
|
|
"loc": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 33
|
|
}
|
|
},
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start": 123,
|
|
"end": 149,
|
|
"loc": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 6
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 32
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 123,
|
|
"end": 127,
|
|
"loc": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 6
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 10
|
|
},
|
|
"identifierName": "rect"
|
|
},
|
|
"name": "rect"
|
|
},
|
|
"init": {
|
|
"type": "NewExpression",
|
|
"start": 130,
|
|
"end": 149,
|
|
"loc": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 13
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 32
|
|
}
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"start": 134,
|
|
"end": 143,
|
|
"loc": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 17
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 26
|
|
},
|
|
"identifierName": "Rectangle"
|
|
},
|
|
"name": "Rectangle"
|
|
},
|
|
"arguments": [
|
|
{
|
|
"type": "NumericLiteral",
|
|
"start": 144,
|
|
"end": 145,
|
|
"loc": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 27
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 28
|
|
}
|
|
},
|
|
"extra": {
|
|
"rawValue": 2,
|
|
"raw": "2"
|
|
},
|
|
"value": 2
|
|
},
|
|
{
|
|
"type": "NumericLiteral",
|
|
"start": 147,
|
|
"end": 148,
|
|
"loc": {
|
|
"start": {
|
|
"line": 7,
|
|
"column": 30
|
|
},
|
|
"end": {
|
|
"line": 7,
|
|
"column": 31
|
|
}
|
|
},
|
|
"extra": {
|
|
"rawValue": 3,
|
|
"raw": "3"
|
|
},
|
|
"value": 3
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"kind": "const"
|
|
}
|
|
],
|
|
"directives": []
|
|
},
|
|
"comments": []
|
|
}
|