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/lever.js.json
2021-02-26 15:20:37 +01:00

3318 lines
78 KiB
JSON

{
"type": "File",
"start": 0,
"end": 714,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 32,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 714,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 32,
"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": "ImportDeclaration",
"start": 43,
"end": 96,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 53
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 52,
"end": 57,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 14
}
},
"imported": {
"type": "Identifier",
"start": 52,
"end": 57,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 14
},
"identifierName": "types"
},
"name": "types"
},
"local": {
"type": "Identifier",
"start": 52,
"end": 57,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 14
},
"identifierName": "types"
},
"name": "types"
}
}
],
"source": {
"type": "StringLiteral",
"start": 65,
"end": 95,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 52
}
},
"extra": {
"rawValue": "../../savegame/serialization",
"raw": "\"../../savegame/serialization\""
},
"value": "../../savegame/serialization"
}
},
{
"type": "ExportNamedDeclaration",
"start": 100,
"end": 712,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 31,
"column": 1
}
},
"specifiers": [],
"source": null,
"declaration": {
"type": "ClassDeclaration",
"start": 107,
"end": 712,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 31,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 113,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 13
},
"end": {
"line": 4,
"column": 27
},
"identifierName": "LeverComponent"
},
"name": "LeverComponent"
},
"superClass": {
"type": "Identifier",
"start": 136,
"end": 145,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 4,
"column": 45
},
"identifierName": "Component"
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 146,
"end": 712,
"loc": {
"start": {
"line": 4,
"column": 46
},
"end": {
"line": 31,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 153,
"end": 201,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 7,
"column": 5
}
},
"static": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 160,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 16
},
"identifierName": "getId"
},
"name": "getId"
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 168,
"end": 201,
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 7,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 179,
"end": 194,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 23
}
},
"argument": {
"type": "StringLiteral",
"start": 186,
"end": 193,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 22
}
},
"extra": {
"rawValue": "Lever",
"raw": "\"Lever\""
},
"value": "Lever"
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 209,
"end": 300,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 13,
"column": 5
}
},
"static": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 216,
"end": 225,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 20
},
"identifierName": "getSchema"
},
"name": "getSchema"
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 228,
"end": 300,
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 13,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 239,
"end": 293,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 12,
"column": 10
}
},
"argument": {
"type": "ObjectExpression",
"start": 246,
"end": 292,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 12,
"column": 9
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 261,
"end": 280,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 31
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 261,
"end": 268,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 19
},
"identifierName": "toggled"
},
"name": "toggled"
},
"value": {
"type": "MemberExpression",
"start": 270,
"end": 280,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 31
}
},
"object": {
"type": "Identifier",
"start": 270,
"end": 275,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 26
},
"identifierName": "types"
},
"name": "types"
},
"property": {
"type": "Identifier",
"start": 276,
"end": 280,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 31
},
"identifierName": "bool"
},
"name": "bool"
},
"computed": false
}
}
]
}
}
],
"directives": [],
"trailingComments": null
},
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Copy the current state to another component\r\n * @param {LeverComponent} otherComponent\r\n ",
"start": 308,
"end": 419,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 18,
"column": 7
}
}
}
]
},
{
"type": "ClassMethod",
"start": 425,
"end": 519,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 425,
"end": 446,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 25
},
"identifierName": "copyAdditionalStateTo"
},
"name": "copyAdditionalStateTo",
"leadingComments": null
},
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 447,
"end": 461,
"loc": {
"start": {
"line": 19,
"column": 26
},
"end": {
"line": 19,
"column": 40
},
"identifierName": "otherComponent"
},
"name": "otherComponent"
}
],
"body": {
"type": "BlockStatement",
"start": 463,
"end": 519,
"loc": {
"start": {
"line": 19,
"column": 42
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 474,
"end": 512,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 46
}
},
"expression": {
"type": "AssignmentExpression",
"start": 474,
"end": 511,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 45
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 474,
"end": 496,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 30
}
},
"object": {
"type": "Identifier",
"start": 474,
"end": 488,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 22
},
"identifierName": "otherComponent"
},
"name": "otherComponent"
},
"property": {
"type": "Identifier",
"start": 489,
"end": 496,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 30
},
"identifierName": "toggled"
},
"name": "toggled"
},
"computed": false
},
"right": {
"type": "MemberExpression",
"start": 499,
"end": 511,
"loc": {
"start": {
"line": 20,
"column": 33
},
"end": {
"line": 20,
"column": 45
}
},
"object": {
"type": "ThisExpression",
"start": 499,
"end": 503,
"loc": {
"start": {
"line": 20,
"column": 33
},
"end": {
"line": 20,
"column": 37
}
}
},
"property": {
"type": "Identifier",
"start": 504,
"end": 511,
"loc": {
"start": {
"line": 20,
"column": 38
},
"end": {
"line": 20,
"column": 45
},
"identifierName": "toggled"
},
"name": "toggled"
},
"computed": false
}
}
}
],
"directives": [],
"trailingComments": null
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * Copy the current state to another component\r\n * @param {LeverComponent} otherComponent\r\n ",
"start": 308,
"end": 419,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 18,
"column": 7
}
}
}
],
"trailingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * @param {object} param0\r\n * @param {boolean=} param0.toggled\r\n ",
"start": 527,
"end": 611,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 26,
"column": 7
}
}
}
]
},
{
"type": "ClassMethod",
"start": 617,
"end": 709,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 30,
"column": 5
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 617,
"end": 628,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor",
"leadingComments": null
},
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "ObjectPattern",
"start": 629,
"end": 648,
"loc": {
"start": {
"line": 27,
"column": 16
},
"end": {
"line": 27,
"column": 35
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 631,
"end": 646,
"loc": {
"start": {
"line": 27,
"column": 18
},
"end": {
"line": 27,
"column": 33
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 631,
"end": 638,
"loc": {
"start": {
"line": 27,
"column": 18
},
"end": {
"line": 27,
"column": 25
},
"identifierName": "toggled"
},
"name": "toggled"
},
"value": {
"type": "AssignmentPattern",
"start": 631,
"end": 646,
"loc": {
"start": {
"line": 27,
"column": 18
},
"end": {
"line": 27,
"column": 33
}
},
"left": {
"type": "Identifier",
"start": 631,
"end": 638,
"loc": {
"start": {
"line": 27,
"column": 18
},
"end": {
"line": 27,
"column": 25
},
"identifierName": "toggled"
},
"name": "toggled"
},
"right": {
"type": "BooleanLiteral",
"start": 641,
"end": 646,
"loc": {
"start": {
"line": 27,
"column": 28
},
"end": {
"line": 27,
"column": 33
}
},
"value": false
}
},
"extra": {
"shorthand": true
}
}
]
}
],
"body": {
"type": "BlockStatement",
"start": 650,
"end": 709,
"loc": {
"start": {
"line": 27,
"column": 37
},
"end": {
"line": 30,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 661,
"end": 669,
"loc": {
"start": {
"line": 28,
"column": 8
},
"end": {
"line": 28,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 661,
"end": 668,
"loc": {
"start": {
"line": 28,
"column": 8
},
"end": {
"line": 28,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 661,
"end": 666,
"loc": {
"start": {
"line": 28,
"column": 8
},
"end": {
"line": 28,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 679,
"end": 702,
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 679,
"end": 701,
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 679,
"end": 691,
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 679,
"end": 683,
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 684,
"end": 691,
"loc": {
"start": {
"line": 29,
"column": 13
},
"end": {
"line": 29,
"column": 20
},
"identifierName": "toggled"
},
"name": "toggled"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 694,
"end": 701,
"loc": {
"start": {
"line": 29,
"column": 23
},
"end": {
"line": 29,
"column": 30
},
"identifierName": "toggled"
},
"name": "toggled"
}
}
}
],
"directives": []
},
"leadingComments": [
{
"type": "CommentBlock",
"value": "*\r\n * @param {object} param0\r\n * @param {boolean=} param0.toggled\r\n ",
"start": 527,
"end": 611,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 26,
"column": 7
}
}
}
]
}
]
},
"leadingComments": [],
"trailingComments": []
}
}
],
"directives": []
},
"comments": [
{
"type": "CommentBlock",
"value": "*\r\n * Copy the current state to another component\r\n * @param {LeverComponent} otherComponent\r\n ",
"start": 308,
"end": 419,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 18,
"column": 7
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * @param {object} param0\r\n * @param {boolean=} param0.toggled\r\n ",
"start": 527,
"end": 611,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 26,
"column": 7
}
}
}
],
"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": "import",
"keyword": "import",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "import",
"start": 43,
"end": 49,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 6
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 50,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "types",
"start": 52,
"end": 57,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 14
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 58,
"end": 59,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 60,
"end": 64,
"loc": {
"start": {
"line": 2,
"column": 17
},
"end": {
"line": 2,
"column": 21
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "../../savegame/serialization",
"start": 65,
"end": 95,
"loc": {
"start": {
"line": 2,
"column": 22
},
"end": {
"line": 2,
"column": 52
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 95,
"end": 96,
"loc": {
"start": {
"line": 2,
"column": 52
},
"end": {
"line": 2,
"column": 53
}
}
},
{
"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": 100,
"end": 106,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"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": 107,
"end": 112,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 12
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "LeverComponent",
"start": 113,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 13
},
"end": {
"line": 4,
"column": 27
}
}
},
{
"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": 128,
"end": 135,
"loc": {
"start": {
"line": 4,
"column": 28
},
"end": {
"line": 4,
"column": 35
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Component",
"start": 136,
"end": 145,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 4,
"column": 45
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 146,
"end": 147,
"loc": {
"start": {
"line": 4,
"column": 46
},
"end": {
"line": 4,
"column": 47
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "static",
"start": 153,
"end": 159,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getId",
"start": 160,
"end": 165,
"loc": {
"start": {
"line": 5,
"column": 11
},
"end": {
"line": 5,
"column": 16
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 165,
"end": 166,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"column": 17
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 166,
"end": 167,
"loc": {
"start": {
"line": 5,
"column": 17
},
"end": {
"line": 5,
"column": 18
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 168,
"end": 169,
"loc": {
"start": {
"line": 5,
"column": 19
},
"end": {
"line": 5,
"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": 179,
"end": 185,
"loc": {
"start": {
"line": 6,
"column": 8
},
"end": {
"line": 6,
"column": 14
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "Lever",
"start": 186,
"end": 193,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 6,
"column": 22
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 193,
"end": 194,
"loc": {
"start": {
"line": 6,
"column": 22
},
"end": {
"line": 6,
"column": 23
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 200,
"end": 201,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 5
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "static",
"start": 209,
"end": 215,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "getSchema",
"start": 216,
"end": 225,
"loc": {
"start": {
"line": 9,
"column": 11
},
"end": {
"line": 9,
"column": 20
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 225,
"end": 226,
"loc": {
"start": {
"line": 9,
"column": 20
},
"end": {
"line": 9,
"column": 21
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 226,
"end": 227,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 9,
"column": 22
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 228,
"end": 229,
"loc": {
"start": {
"line": 9,
"column": 23
},
"end": {
"line": 9,
"column": 24
}
}
},
{
"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": 239,
"end": 245,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 14
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 246,
"end": 247,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "toggled",
"start": 261,
"end": 268,
"loc": {
"start": {
"line": 11,
"column": 12
},
"end": {
"line": 11,
"column": 19
}
}
},
{
"type": {
"label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 268,
"end": 269,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 20
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "types",
"start": 270,
"end": 275,
"loc": {
"start": {
"line": 11,
"column": 21
},
"end": {
"line": 11,
"column": 26
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 275,
"end": 276,
"loc": {
"start": {
"line": 11,
"column": 26
},
"end": {
"line": 11,
"column": 27
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "bool",
"start": 276,
"end": 280,
"loc": {
"start": {
"line": 11,
"column": 27
},
"end": {
"line": 11,
"column": 31
}
}
},
{
"type": {
"label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 280,
"end": 281,
"loc": {
"start": {
"line": 11,
"column": 31
},
"end": {
"line": 11,
"column": 32
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 291,
"end": 292,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 9
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 292,
"end": 293,
"loc": {
"start": {
"line": 12,
"column": 9
},
"end": {
"line": 12,
"column": 10
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 299,
"end": 300,
"loc": {
"start": {
"line": 13,
"column": 4
},
"end": {
"line": 13,
"column": 5
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * Copy the current state to another component\r\n * @param {LeverComponent} otherComponent\r\n ",
"start": 308,
"end": 419,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 18,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "copyAdditionalStateTo",
"start": 425,
"end": 446,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 25
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 446,
"end": 447,
"loc": {
"start": {
"line": 19,
"column": 25
},
"end": {
"line": 19,
"column": 26
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "otherComponent",
"start": 447,
"end": 461,
"loc": {
"start": {
"line": 19,
"column": 26
},
"end": {
"line": 19,
"column": 40
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 461,
"end": 462,
"loc": {
"start": {
"line": 19,
"column": 40
},
"end": {
"line": 19,
"column": 41
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 463,
"end": 464,
"loc": {
"start": {
"line": 19,
"column": 42
},
"end": {
"line": 19,
"column": 43
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "otherComponent",
"start": 474,
"end": 488,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 22
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 488,
"end": 489,
"loc": {
"start": {
"line": 20,
"column": 22
},
"end": {
"line": 20,
"column": 23
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "toggled",
"start": 489,
"end": 496,
"loc": {
"start": {
"line": 20,
"column": 23
},
"end": {
"line": 20,
"column": 30
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 497,
"end": 498,
"loc": {
"start": {
"line": 20,
"column": 31
},
"end": {
"line": 20,
"column": 32
}
}
},
{
"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": 499,
"end": 503,
"loc": {
"start": {
"line": 20,
"column": 33
},
"end": {
"line": 20,
"column": 37
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 503,
"end": 504,
"loc": {
"start": {
"line": 20,
"column": 37
},
"end": {
"line": 20,
"column": 38
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "toggled",
"start": 504,
"end": 511,
"loc": {
"start": {
"line": 20,
"column": 38
},
"end": {
"line": 20,
"column": 45
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 511,
"end": 512,
"loc": {
"start": {
"line": 20,
"column": 45
},
"end": {
"line": 20,
"column": 46
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 518,
"end": 519,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
}
},
{
"type": "CommentBlock",
"value": "*\r\n * @param {object} param0\r\n * @param {boolean=} param0.toggled\r\n ",
"start": 527,
"end": 611,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 26,
"column": 7
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "constructor",
"start": 617,
"end": 628,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 15
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 628,
"end": 629,
"loc": {
"start": {
"line": 27,
"column": 15
},
"end": {
"line": 27,
"column": 16
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 629,
"end": 630,
"loc": {
"start": {
"line": 27,
"column": 16
},
"end": {
"line": 27,
"column": 17
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "toggled",
"start": 631,
"end": 638,
"loc": {
"start": {
"line": 27,
"column": 18
},
"end": {
"line": 27,
"column": 25
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 639,
"end": 640,
"loc": {
"start": {
"line": 27,
"column": 26
},
"end": {
"line": 27,
"column": 27
}
}
},
{
"type": {
"label": "false",
"keyword": "false",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "false",
"start": 641,
"end": 646,
"loc": {
"start": {
"line": 27,
"column": 28
},
"end": {
"line": 27,
"column": 33
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 647,
"end": 648,
"loc": {
"start": {
"line": 27,
"column": 34
},
"end": {
"line": 27,
"column": 35
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 648,
"end": 649,
"loc": {
"start": {
"line": 27,
"column": 35
},
"end": {
"line": 27,
"column": 36
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 650,
"end": 651,
"loc": {
"start": {
"line": 27,
"column": 37
},
"end": {
"line": 27,
"column": 38
}
}
},
{
"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": 661,
"end": 666,
"loc": {
"start": {
"line": 28,
"column": 8
},
"end": {
"line": 28,
"column": 13
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 666,
"end": 667,
"loc": {
"start": {
"line": 28,
"column": 13
},
"end": {
"line": 28,
"column": 14
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 667,
"end": 668,
"loc": {
"start": {
"line": 28,
"column": 14
},
"end": {
"line": 28,
"column": 15
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 668,
"end": 669,
"loc": {
"start": {
"line": 28,
"column": 15
},
"end": {
"line": 28,
"column": 16
}
}
},
{
"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": 679,
"end": 683,
"loc": {
"start": {
"line": 29,
"column": 8
},
"end": {
"line": 29,
"column": 12
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 683,
"end": 684,
"loc": {
"start": {
"line": 29,
"column": 12
},
"end": {
"line": 29,
"column": 13
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "toggled",
"start": 684,
"end": 691,
"loc": {
"start": {
"line": 29,
"column": 13
},
"end": {
"line": 29,
"column": 20
}
}
},
{
"type": {
"label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "=",
"start": 692,
"end": 693,
"loc": {
"start": {
"line": 29,
"column": 21
},
"end": {
"line": 29,
"column": 22
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "toggled",
"start": 694,
"end": 701,
"loc": {
"start": {
"line": 29,
"column": 23
},
"end": {
"line": 29,
"column": 30
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 701,
"end": 702,
"loc": {
"start": {
"line": 29,
"column": 30
},
"end": {
"line": 29,
"column": 31
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 708,
"end": 709,
"loc": {
"start": {
"line": 30,
"column": 4
},
"end": {
"line": 30,
"column": 5
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 711,
"end": 712,
"loc": {
"start": {
"line": 31,
"column": 0
},
"end": {
"line": 31,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 714,
"end": 714,
"loc": {
"start": {
"line": 32,
"column": 0
},
"end": {
"line": 32,
"column": 0
}
}
}
]
}