mirror of
https://github.com/swc-project/swc.git
synced 2024-12-01 01:13:56 +03:00
269 lines
5.8 KiB
JSON
269 lines
5.8 KiB
JSON
{
|
|
"type": "Script",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 1,
|
|
"end": 20,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "let",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 19,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 5,
|
|
"end": 6,
|
|
"ctxt": 0
|
|
},
|
|
"value": "o",
|
|
"optional": false,
|
|
"typeAnnotation": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 6,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 8,
|
|
"end": 14,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "object"
|
|
}
|
|
}
|
|
},
|
|
"init": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 17,
|
|
"end": 19,
|
|
"ctxt": 0
|
|
},
|
|
"properties": []
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"identifier": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 31,
|
|
"end": 32,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f",
|
|
"optional": false
|
|
},
|
|
"declare": false,
|
|
"params": [],
|
|
"decorators": [],
|
|
"span": {
|
|
"start": 22,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"span": {
|
|
"start": 43,
|
|
"end": 58,
|
|
"ctxt": 0
|
|
},
|
|
"stmts": [
|
|
{
|
|
"type": "ReturnStatement",
|
|
"span": {
|
|
"start": 46,
|
|
"end": 56,
|
|
"ctxt": 0
|
|
},
|
|
"argument": {
|
|
"type": "ObjectExpression",
|
|
"span": {
|
|
"start": 53,
|
|
"end": 55,
|
|
"ctxt": 0
|
|
},
|
|
"properties": []
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"typeParameters": null,
|
|
"returnType": {
|
|
"type": "TsTypeAnnotation",
|
|
"span": {
|
|
"start": 34,
|
|
"end": 42,
|
|
"ctxt": 0
|
|
},
|
|
"typeAnnotation": {
|
|
"type": "TsKeywordType",
|
|
"span": {
|
|
"start": 36,
|
|
"end": 42,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "object"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 60,
|
|
"end": 82,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 66,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 66,
|
|
"end": 68,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b1",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 71,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 71,
|
|
"end": 76,
|
|
"ctxt": 0
|
|
},
|
|
"value": "foo",
|
|
"raw": "\"foo\""
|
|
},
|
|
"right": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 80,
|
|
"end": 81,
|
|
"ctxt": 0
|
|
},
|
|
"value": "o",
|
|
"optional": false
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"span": {
|
|
"start": 83,
|
|
"end": 107,
|
|
"ctxt": 0
|
|
},
|
|
"kind": "const",
|
|
"declare": false,
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"span": {
|
|
"start": 89,
|
|
"end": 106,
|
|
"ctxt": 0
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 89,
|
|
"end": 91,
|
|
"ctxt": 0
|
|
},
|
|
"value": "b2",
|
|
"optional": false,
|
|
"typeAnnotation": null
|
|
},
|
|
"init": {
|
|
"type": "BinaryExpression",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 106,
|
|
"ctxt": 0
|
|
},
|
|
"operator": "in",
|
|
"left": {
|
|
"type": "StringLiteral",
|
|
"span": {
|
|
"start": 94,
|
|
"end": 99,
|
|
"ctxt": 0
|
|
},
|
|
"value": "bar",
|
|
"raw": "\"bar\""
|
|
},
|
|
"right": {
|
|
"type": "CallExpression",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 106,
|
|
"ctxt": 0
|
|
},
|
|
"callee": {
|
|
"type": "Identifier",
|
|
"span": {
|
|
"start": 103,
|
|
"end": 104,
|
|
"ctxt": 0
|
|
},
|
|
"value": "f",
|
|
"optional": false
|
|
},
|
|
"arguments": [],
|
|
"typeArguments": null
|
|
}
|
|
},
|
|
"definite": false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"interpreter": null
|
|
}
|