swc/crates/swc_estree_compat/tests/fixtures/array-destructuring/output.json

298 lines
11 KiB
JSON
Raw Normal View History

{
"type": "File",
"start": 0,
"end": 57,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 0
}
},
"errors": [],
"program": {
"type": "Program",
"start": 0,
"end": 57,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 0
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 6,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 23
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 9,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 9
},
"identifierName": "arr"
},
"name": "arr"
},
"init": {
"type": "ArrayExpression",
"start": 12,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 23
}
},
"elements": [
{
"type": "NumericLiteral",
"start": 14,
"end": 15,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1
},
{
"type": "NumericLiteral",
"start": 17,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 18
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2
},
{
"type": "NumericLiteral",
"start": 20,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 20
},
"end": {
"line": 1,
"column": 21
}
},
"extra": {
"rawValue": 3,
"raw": "3"
},
"value": 3
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 25,
"end": 56,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 31
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 31,
"end": 55,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 30
}
},
"id": {
"type": "ArrayPattern",
"start": 31,
"end": 49,
"loc": {
"start": {
"line": 2,
"column": 6
},
"end": {
"line": 2,
"column": 24
}
},
"elements": [
{
"type": "Identifier",
"start": 33,
"end": 34,
"loc": {
"start": {
"line": 2,
"column": 8
},
"end": {
"line": 2,
"column": 9
},
"identifierName": "a"
},
"name": "a"
},
{
"type": "Identifier",
"start": 36,
"end": 37,
"loc": {
"start": {
"line": 2,
"column": 11
},
"end": {
"line": 2,
"column": 12
},
"identifierName": "b"
},
"name": "b"
},
{
"type": "RestElement",
"start": 39,
"end": 47,
"loc": {
"start": {
"line": 2,
"column": 14
},
"end": {
"line": 2,
"column": 22
}
},
"argument": {
"type": "Identifier",
"start": 42,
"end": 47,
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 22
},
"identifierName": "other"
},
"name": "other"
}
}
]
},
"init": {
"type": "Identifier",
"start": 52,
"end": 55,
"loc": {
"start": {
"line": 2,
"column": 27
},
"end": {
"line": 2,
"column": 30
},
"identifierName": "arr"
},
"name": "arr"
}
}
],
"kind": "const"
}
],
"directives": []
},
"comments": []
}