277 lines
6.2 KiB
JSON
Executable File

{
"type": "File",
"start": 0,
"end": 91,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
},
"program": {
"type": "Program",
"start": 0,
"end": 91,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
},
"sourceType": "script",
"body": [
{
"type": "SwitchStatement",
"start": 0,
"end": 91,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 7,
"column": 1
}
},
"discriminant": {
"type": "Identifier",
"start": 7,
"end": 10,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 10
}
},
"name": "foo"
},
"cases": [
{
"type": "SwitchCase",
"start": 29,
"end": 36,
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 11
}
},
"consequent": [],
"test": {
"type": "NumericLiteral",
"start": 34,
"end": 35,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 10
}
},
"extra": {
"rawValue": 1,
"raw": "1"
},
"value": 1,
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " foo",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 10
}
}
}
],
"trailingComments": [
{
"type": "CommentLine",
"value": " falls through",
"start": 45,
"end": 61,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
}
}
]
},
{
"type": "SwitchCase",
"start": 66,
"end": 89,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 6,
"column": 15
}
},
"consequent": [
{
"type": "ExpressionStatement",
"start": 82,
"end": 89,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 15
}
},
"expression": {
"type": "CallExpression",
"start": 82,
"end": 88,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 14
}
},
"callee": {
"type": "Identifier",
"start": 82,
"end": 86,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 12
}
},
"name": "doIt"
},
"arguments": []
}
}
],
"test": {
"type": "NumericLiteral",
"start": 71,
"end": 72,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 10
}
},
"extra": {
"rawValue": 2,
"raw": "2"
},
"value": 2,
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " falls through",
"start": 45,
"end": 61,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
}
}
]
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentLine",
"value": " foo",
"start": 18,
"end": 24,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 10
}
}
},
{
"type": "CommentLine",
"value": " falls through",
"start": 45,
"end": 61,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 24
}
}
}
]
}