1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00
tobspr_shapez.io/docs/ast/source/game/components/wire_tunnel.js.json

1615 lines
37 KiB
JSON
Raw Normal View History

2021-02-26 14:20:37 +00:00
{
"type": "File",
"start": 0,
"end": 401,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 18,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 401,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 18,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 41
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
},
"identifierName": "Component"
},
"name": "Component"
},
"local": {
"type": "Identifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
},
"identifierName": "Component"
},
"name": "Component"
}
}
],
"source": {
"type": "StringLiteral",
"start": 26,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 40
}
},
"extra": {
"rawValue": "../component",
"raw": "\"../component\""
},
"value": "../component"
}
},
{
"type": "ExportNamedDeclaration",
"start": 45,
"end": 399,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 17,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "ClassDeclaration",
"start": 52,
"end": 399,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 17,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 58,
"end": 77,
"loc": {
"start": {
"line": 3,
"column": 13
},
"end": {
"line": 3,
"column": 32
},
"identifierName": "WireTunnelComponent"
},
"name": "WireTunnelComponent"
},
"superClass": {
"type": "Identifier",
"start": 86,
"end": 95,
"loc": {
"start": {
"line": 3,
"column": 41
},
"end": {
"line": 3,
"column": 50
},
"identifierName": "Component"
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 96,
"end": 399,
"loc": {
"start": {
"line": 3,
"column": 51
},
"end": {
"line": 17,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 103,
"end": 156,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 6,
"column": 5
}
},
"static": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 110,
"end": 115,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 16
},
"identifierName": "getId"
},
"name": "getId"
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 118,
"end": 156,
"loc": {
"start": {
"line": 4,
"column": 19
},
"end": {
"line": 6,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 129,
"end": 149,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 28
}
},
"argument": {
"type": "StringLiteral",
"start": 136,
"end": 148,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 27
}
},
"extra": {
"rawValue": "WireTunnel",
"raw": "\"WireTunnel\""
},
"value": "WireTunnel"
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 164,
"end": 396,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 16,
"column": 5
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 164,
"end": 175,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 178,
"end": 396,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 16,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 189,
"end": 197,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 189,
"end": 196,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 189,
"end": 194,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 13
}
}
},
"arguments": []
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Linked network, only if its not multiple directions\r\n * @type {Array<import(\"../systems/wire\").WireNetwork>}\r\n ",
"start": 209,
"end": 354,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 14,
"column": 11
}
}
}
]
},
{
"type": "ExpressionStatement",
"start": 364,
"end": 389,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 33
}
},
"expression": {
"type": "AssignmentExpression",
"start": 364,
"end": 388,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 32
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 364,
"end": 383,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 27
}
},
"object": {
"type": "ThisExpression",
"start": 364,
"end": 368,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
},
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 369,
"end": 383,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 27
},
"identifierName": "linkedNetworks"
},
"name": "linkedNetworks"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "ArrayExpression",
"start": 386,
"end": 388,
"loc": {
"start": {
"line": 15,
"column": 30
},
"end": {
"line": 15,
"column": 32
}
},
"elements": []
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Linked network, only if its not multiple directions\r\n * @type {Array<import(\"../systems/wire\").WireNetwork>}\r\n ",
"start": 209,
"end": 354,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 14,
"column": 11
}
}
}
]
}
],
"directives": []
}
}
]
},
"leadingComments": [],
"trailingComments": []
}
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\r\n * Linked network, only if its not multiple directions\r\n * @type {Array<import(\"../systems/wire\").WireNetwork>}\r\n ",
"start": 209,
"end": 354,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 14,
"column": 11
}
}
}
],
"tokens": [
{
"type": {
"label": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 0,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 6
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 7,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Component",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 19,
"end": 20,
"loc": {
"start": {
"line": 1,
"column": 19
},
"end": {
"line": 1,
"column": 20
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 21,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 25
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "../component",
"start": 26,
"end": 40,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 40
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 40,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 40
},
"end": {
"line": 1,
"column": 41
}
}
},
{
"type": {
"label": "export",
"keyword": "export",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "export",
"start": 45,
"end": 51,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 6
}
}
},
{
"type": {
"label": "class",
"keyword": "class",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "class",
"start": 52,
"end": 57,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "WireTunnelComponent",
"start": 58,
"end": 77,
"loc": {
"start": {
"line": 3,
"column": 13
},
"end": {
"line": 3,
"column": 32
}
}
},
{
"type": {
"label": "extends",
"keyword": "extends",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "extends",
"start": 78,
"end": 85,
"loc": {
"start": {
"line": 3,
"column": 33
},
"end": {
"line": 3,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Component",
"start": 86,
"end": 95,
"loc": {
"start": {
"line": 3,
"column": 41
},
"end": {
"line": 3,
"column": 50
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 96,
"end": 97,
"loc": {
"start": {
"line": 3,
"column": 51
},
"end": {
"line": 3,
"column": 52
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "static",
"start": 103,
"end": 109,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getId",
"start": 110,
"end": 115,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 16
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 115,
"end": 116,
"loc": {
"start": {
"line": 4,
"column": 16
},
"end": {
"line": 4,
"column": 17
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 116,
"end": 117,
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 18
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 118,
"end": 119,
"loc": {
"start": {
"line": 4,
"column": 19
},
"end": {
"line": 4,
"column": 20
}
}
},
{
"type": {
"label": "return",
"keyword": "return",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "return",
"start": 129,
"end": 135,
"loc": {
"start": {
"line": 5,
"column": 8
},
"end": {
"line": 5,
"column": 14
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "WireTunnel",
"start": 136,
"end": 148,
"loc": {
"start": {
"line": 5,
"column": 15
},
"end": {
"line": 5,
"column": 27
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 148,
"end": 149,
"loc": {
"start": {
"line": 5,
"column": 27
},
"end": {
"line": 5,
"column": 28
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 155,
"end": 156,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 5
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "constructor",
"start": 164,
"end": 175,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 15
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 175,
"end": 176,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 8,
"column": 16
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 176,
"end": 177,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 17
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 178,
"end": 179,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 19
}
}
},
{
"type": {
"label": "super",
"keyword": "super",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "super",
"start": 189,
"end": 194,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 13
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 194,
"end": 195,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 14
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 195,
"end": 196,
"loc": {
"start": {
"line": 9,
"column": 14
},
"end": {
"line": 9,
"column": 15
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 196,
"end": 197,
"loc": {
"start": {
"line": 9,
"column": 15
},
"end": {
"line": 9,
"column": 16
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Linked network, only if its not multiple directions\r\n * @type {Array<import(\"../systems/wire\").WireNetwork>}\r\n ",
"start": 209,
"end": 354,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 14,
"column": 11
}
}
},
{
"type": {
"label": "this",
"keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "this",
"start": 364,
"end": 368,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 368,
"end": 369,
"loc": {
"start": {
"line": 15,
"column": 12
},
"end": {
"line": 15,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "linkedNetworks",
"start": 369,
"end": 383,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 27
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 384,
"end": 385,
"loc": {
"start": {
"line": 15,
"column": 28
},
"end": {
"line": 15,
"column": 29
}
}
},
{
"type": {
"label": "[",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 386,
"end": 387,
"loc": {
"start": {
"line": 15,
"column": 30
},
"end": {
"line": 15,
"column": 31
}
}
},
{
"type": {
"label": "]",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 387,
"end": 388,
"loc": {
"start": {
"line": 15,
"column": 31
},
"end": {
"line": 15,
"column": 32
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 388,
"end": 389,
"loc": {
"start": {
"line": 15,
"column": 32
},
"end": {
"line": 15,
"column": 33
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 395,
"end": 396,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 5
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 398,
"end": 399,
"loc": {
"start": {
"line": 17,
"column": 0
},
"end": {
"line": 17,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 401,
"end": 401,
"loc": {
"start": {
"line": 18,
"column": 0
},
"end": {
"line": 18,
"column": 0
}
}
}
]
}