mirror of
https://github.com/swc-project/swc.git
synced 2024-12-21 04:32:01 +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`.
226 lines
7.8 KiB
JSON
226 lines
7.8 KiB
JSON
{
|
|
"type": "File",
|
|
"start": 0,
|
|
"end": 75,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 0
|
|
}
|
|
},
|
|
"errors": [],
|
|
"program": {
|
|
"type": "Program",
|
|
"start": 0,
|
|
"end": 75,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 5,
|
|
"column": 0
|
|
}
|
|
},
|
|
"sourceType": "script",
|
|
"interpreter": null,
|
|
"body": [
|
|
{
|
|
"type": "FunctionDeclaration",
|
|
"start": 0,
|
|
"end": 74,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 0
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 1
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 9,
|
|
"end": 10,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 9
|
|
},
|
|
"end": {
|
|
"line": 1,
|
|
"column": 10
|
|
},
|
|
"identifierName": "x"
|
|
},
|
|
"name": "x"
|
|
},
|
|
"generator": false,
|
|
"async": false,
|
|
"params": [],
|
|
"body": {
|
|
"type": "BlockStatement",
|
|
"start": 13,
|
|
"end": 74,
|
|
"loc": {
|
|
"start": {
|
|
"line": 1,
|
|
"column": 13
|
|
},
|
|
"end": {
|
|
"line": 4,
|
|
"column": 1
|
|
}
|
|
},
|
|
"body": [
|
|
{
|
|
"type": "VariableDeclaration",
|
|
"start": 39,
|
|
"end": 52,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 4
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 17
|
|
}
|
|
},
|
|
"leadingComments": [
|
|
{
|
|
"type": "CommentLine",
|
|
"value": " some comment",
|
|
"start": 19,
|
|
"end": 34,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 4
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 19
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"trailingComments": [
|
|
{
|
|
"type": "CommentLine",
|
|
"value": " trailing comment",
|
|
"start": 53,
|
|
"end": 72,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 18
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 37
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"declarations": [
|
|
{
|
|
"type": "VariableDeclarator",
|
|
"start": 43,
|
|
"end": 51,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 16
|
|
}
|
|
},
|
|
"id": {
|
|
"type": "Identifier",
|
|
"start": 43,
|
|
"end": 44,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 8
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 9
|
|
},
|
|
"identifierName": "a"
|
|
},
|
|
"name": "a"
|
|
},
|
|
"init": {
|
|
"type": "BooleanLiteral",
|
|
"start": 47,
|
|
"end": 51,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 12
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 16
|
|
}
|
|
},
|
|
"value": true
|
|
}
|
|
}
|
|
],
|
|
"kind": "let"
|
|
}
|
|
],
|
|
"directives": []
|
|
}
|
|
}
|
|
],
|
|
"directives": []
|
|
},
|
|
"comments": [
|
|
{
|
|
"type": "CommentLine",
|
|
"value": " some comment",
|
|
"start": 19,
|
|
"end": 34,
|
|
"loc": {
|
|
"start": {
|
|
"line": 2,
|
|
"column": 4
|
|
},
|
|
"end": {
|
|
"line": 2,
|
|
"column": 19
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "CommentLine",
|
|
"value": " trailing comment",
|
|
"start": 53,
|
|
"end": 72,
|
|
"loc": {
|
|
"start": {
|
|
"line": 3,
|
|
"column": 18
|
|
},
|
|
"end": {
|
|
"line": 3,
|
|
"column": 37
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|