Nicolò Ribaudo 3069747a81
Leave trailing comments after handling a possible trailing com… (#10445)
* Leave trailing comments aftre handling a possible trailing comma

* perf
2019-09-23 19:14:43 +02:00

431 lines
11 KiB
JSON

{
"type": "File",
"start": 0,
"end": 136,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"program": {
"type": "Program",
"start": 0,
"end": 136,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "VariableDeclaration",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 6,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 36
}
},
"id": {
"type": "Identifier",
"start": 6,
"end": 12,
"loc": {
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 12
},
"identifierName": "socket"
},
"name": "socket"
},
"init": {
"type": "CallExpression",
"start": 15,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 36
}
},
"callee": {
"type": "Identifier",
"start": 15,
"end": 27,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 27
},
"identifierName": "socketClient"
},
"name": "socketClient"
},
"arguments": [
{
"type": "Identifier",
"start": 28,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 28
},
"end": {
"line": 1,
"column": 35
},
"identifierName": "address"
},
"name": "address"
}
]
}
}
],
"kind": "const",
"trailingComments": [
{
"type": "CommentBlock",
"value": " istanbul ignore next ",
"start": 37,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 64,
"end": 136,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"expression": {
"type": "CallExpression",
"start": 64,
"end": 136,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 2
}
},
"callee": {
"type": "MemberExpression",
"start": 64,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 9
}
},
"object": {
"type": "Identifier",
"start": 64,
"end": 70,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 6
},
"identifierName": "socket"
},
"name": "socket"
},
"property": {
"type": "Identifier",
"start": 71,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 9
},
"identifierName": "on"
},
"name": "on"
},
"computed": false
},
"arguments": [
{
"type": "StringLiteral",
"start": 74,
"end": 83,
"loc": {
"start": {
"line": 3,
"column": 10
},
"end": {
"line": 3,
"column": 19
}
},
"extra": {
"rawValue": "connect",
"raw": "'connect'"
},
"value": "connect"
},
{
"type": "FunctionExpression",
"start": 85,
"end": 135,
"loc": {
"start": {
"line": 3,
"column": 21
},
"end": {
"line": 5,
"column": 1
}
},
"id": null,
"generator": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 97,
"end": 135,
"loc": {
"start": {
"line": 3,
"column": 33
},
"end": {
"line": 5,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 101,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 34
}
},
"expression": {
"type": "CallExpression",
"start": 101,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 34
}
},
"callee": {
"type": "Identifier",
"start": 101,
"end": 106,
"loc": {
"start": {
"line": 4,
"column": 2
},
"end": {
"line": 4,
"column": 7
},
"identifierName": "debug"
},
"name": "debug"
},
"arguments": [
{
"type": "BinaryExpression",
"start": 107,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 33
}
},
"left": {
"type": "StringLiteral",
"start": 107,
"end": 122,
"loc": {
"start": {
"line": 4,
"column": 8
},
"end": {
"line": 4,
"column": 23
}
},
"extra": {
"rawValue": "Connected to ",
"raw": "'Connected to '"
},
"value": "Connected to "
},
"operator": "+",
"right": {
"type": "Identifier",
"start": 125,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 26
},
"end": {
"line": 4,
"column": 33
},
"identifierName": "address"
},
"name": "address"
}
}
]
}
}
],
"directives": []
}
}
]
},
"leadingComments": [
{
"type": "CommentBlock",
"value": " istanbul ignore next ",
"start": 37,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
}
}
]
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": " istanbul ignore next ",
"start": 37,
"end": 63,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 26
}
}
}
]
}