Files

211 lines
12 KiB
JSON

{
"type": "File",
"start":0,"end":212,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":13,"column":1,"index":212}},
"program": {
"type": "Program",
"start":0,"end":212,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":13,"column":1,"index":212}},
"sourceType": "script",
"interpreter": null,
"body": [
{
"type": "ClassDeclaration",
"start":0,"end":212,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":13,"column":1,"index":212}},
"id": {
"type": "Identifier",
"start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
"name": "Foo"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start":10,"end":212,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":13,"column":1,"index":212}},
"body": [
{
"type": "ClassPrivateMethod",
"start":14,"end":210,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":12,"column":3,"index":210}},
"static": false,
"key": {
"type": "PrivateName",
"start":21,"end":31,"loc":{"start":{"line":2,"column":9,"index":21},"end":{"line":2,"column":19,"index":31}},
"id": {
"type": "Identifier",
"start":22,"end":31,"loc":{"start":{"line":2,"column":10,"index":22},"end":{"line":2,"column":19,"index":31},"identifierName":"readLines"},
"name": "readLines"
}
},
"computed": false,
"kind": "method",
"id": null,
"generator": true,
"async": true,
"params": [
{
"type": "Identifier",
"start":32,"end":36,"loc":{"start":{"line":2,"column":20,"index":32},"end":{"line":2,"column":24,"index":36},"identifierName":"path"},
"name": "path"
}
],
"body": {
"type": "BlockStatement",
"start":38,"end":210,"loc":{"start":{"line":2,"column":26,"index":38},"end":{"line":12,"column":3,"index":210}},
"body": [
{
"type": "VariableDeclaration",
"start":44,"end":76,"loc":{"start":{"line":3,"column":4,"index":44},"end":{"line":3,"column":36,"index":76}},
"declarations": [
{
"type": "VariableDeclarator",
"start":48,"end":75,"loc":{"start":{"line":3,"column":8,"index":48},"end":{"line":3,"column":35,"index":75}},
"id": {
"type": "Identifier",
"start":48,"end":52,"loc":{"start":{"line":3,"column":8,"index":48},"end":{"line":3,"column":12,"index":52},"identifierName":"file"},
"name": "file"
},
"init": {
"type": "AwaitExpression",
"start":55,"end":75,"loc":{"start":{"line":3,"column":15,"index":55},"end":{"line":3,"column":35,"index":75}},
"argument": {
"type": "CallExpression",
"start":61,"end":75,"loc":{"start":{"line":3,"column":21,"index":61},"end":{"line":3,"column":35,"index":75}},
"callee": {
"type": "Identifier",
"start":61,"end":69,"loc":{"start":{"line":3,"column":21,"index":61},"end":{"line":3,"column":29,"index":69},"identifierName":"fileOpen"},
"name": "fileOpen"
},
"arguments": [
{
"type": "Identifier",
"start":70,"end":74,"loc":{"start":{"line":3,"column":30,"index":70},"end":{"line":3,"column":34,"index":74},"identifierName":"path"},
"name": "path"
}
]
}
}
}
],
"kind": "let"
},
{
"type": "TryStatement",
"start":82,"end":206,"loc":{"start":{"line":5,"column":4,"index":82},"end":{"line":11,"column":5,"index":206}},
"block": {
"type": "BlockStatement",
"start":86,"end":164,"loc":{"start":{"line":5,"column":8,"index":86},"end":{"line":9,"column":5,"index":164}},
"body": [
{
"type": "WhileStatement",
"start":94,"end":158,"loc":{"start":{"line":6,"column":6,"index":94},"end":{"line":8,"column":7,"index":158}},
"test": {
"type": "UnaryExpression",
"start":101,"end":110,"loc":{"start":{"line":6,"column":13,"index":101},"end":{"line":6,"column":22,"index":110}},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start":102,"end":110,"loc":{"start":{"line":6,"column":14,"index":102},"end":{"line":6,"column":22,"index":110}},
"object": {
"type": "Identifier",
"start":102,"end":106,"loc":{"start":{"line":6,"column":14,"index":102},"end":{"line":6,"column":18,"index":106},"identifierName":"file"},
"name": "file"
},
"computed": false,
"property": {
"type": "Identifier",
"start":107,"end":110,"loc":{"start":{"line":6,"column":19,"index":107},"end":{"line":6,"column":22,"index":110},"identifierName":"EOF"},
"name": "EOF"
}
}
},
"body": {
"type": "BlockStatement",
"start":112,"end":158,"loc":{"start":{"line":6,"column":24,"index":112},"end":{"line":8,"column":7,"index":158}},
"body": [
{
"type": "ExpressionStatement",
"start":122,"end":150,"loc":{"start":{"line":7,"column":8,"index":122},"end":{"line":7,"column":36,"index":150}},
"expression": {
"type": "YieldExpression",
"start":122,"end":149,"loc":{"start":{"line":7,"column":8,"index":122},"end":{"line":7,"column":35,"index":149}},
"delegate": false,
"argument": {
"type": "AwaitExpression",
"start":128,"end":149,"loc":{"start":{"line":7,"column":14,"index":128},"end":{"line":7,"column":35,"index":149}},
"argument": {
"type": "CallExpression",
"start":134,"end":149,"loc":{"start":{"line":7,"column":20,"index":134},"end":{"line":7,"column":35,"index":149}},
"callee": {
"type": "MemberExpression",
"start":134,"end":147,"loc":{"start":{"line":7,"column":20,"index":134},"end":{"line":7,"column":33,"index":147}},
"object": {
"type": "Identifier",
"start":134,"end":138,"loc":{"start":{"line":7,"column":20,"index":134},"end":{"line":7,"column":24,"index":138},"identifierName":"file"},
"name": "file"
},
"computed": false,
"property": {
"type": "Identifier",
"start":139,"end":147,"loc":{"start":{"line":7,"column":25,"index":139},"end":{"line":7,"column":33,"index":147},"identifierName":"readLine"},
"name": "readLine"
}
},
"arguments": []
}
}
}
}
],
"directives": []
}
}
],
"directives": []
},
"handler": null,
"finalizer": {
"type": "BlockStatement",
"start":173,"end":206,"loc":{"start":{"line":9,"column":14,"index":173},"end":{"line":11,"column":5,"index":206}},
"body": [
{
"type": "ExpressionStatement",
"start":181,"end":200,"loc":{"start":{"line":10,"column":6,"index":181},"end":{"line":10,"column":25,"index":200}},
"expression": {
"type": "AwaitExpression",
"start":181,"end":199,"loc":{"start":{"line":10,"column":6,"index":181},"end":{"line":10,"column":24,"index":199}},
"argument": {
"type": "CallExpression",
"start":187,"end":199,"loc":{"start":{"line":10,"column":12,"index":187},"end":{"line":10,"column":24,"index":199}},
"callee": {
"type": "MemberExpression",
"start":187,"end":197,"loc":{"start":{"line":10,"column":12,"index":187},"end":{"line":10,"column":22,"index":197}},
"object": {
"type": "Identifier",
"start":187,"end":191,"loc":{"start":{"line":10,"column":12,"index":187},"end":{"line":10,"column":16,"index":191},"identifierName":"file"},
"name": "file"
},
"computed": false,
"property": {
"type": "Identifier",
"start":192,"end":197,"loc":{"start":{"line":10,"column":17,"index":192},"end":{"line":10,"column":22,"index":197},"identifierName":"close"},
"name": "close"
}
},
"arguments": []
}
}
}
],
"directives": []
}
}
],
"directives": []
}
}
]
}
}
],
"directives": []
}
}