UNPKG

oxygen-core

Version:

Oxygen game engine (Xenon Core for browsers)

1,287 lines (1,286 loc) 9.44 MB
{ "type": "File", "start": 0, "end": 44041, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1547, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 44041, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1547, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ExpressionStatement", "start": 0, "end": 44039, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1546, "column": 5 } }, "expression": { "type": "AssignmentExpression", "start": 0, "end": 44038, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1546, "column": 4 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 0, "end": 14, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } }, "object": { "type": "Identifier", "start": 0, "end": 6, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 }, "identifierName": "module" }, "name": "module" }, "property": { "type": "Identifier", "start": 7, "end": 14, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 }, "identifierName": "exports" }, "name": "exports" }, "computed": false }, "right": { "type": "CallExpression", "start": 84, "end": 44038, "loc": { "start": { "line": 6, "column": 0 }, "end": { "line": 1546, "column": 4 } }, "callee": { "type": "FunctionExpression", "start": 85, "end": 44035, "loc": { "start": { "line": 6, "column": 1 }, "end": { "line": 1546, "column": 1 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 96, "end": 44035, "loc": { "start": { "line": 6, "column": 12 }, "end": { "line": 1546, "column": 1 } }, "body": [ { "type": "FunctionDeclaration", "start": 120, "end": 289, "loc": { "start": { "line": 9, "column": 2 }, "end": { "line": 13, "column": 3 } }, "id": { "type": "Identifier", "start": 129, "end": 141, "loc": { "start": { "line": 9, "column": 11 }, "end": { "line": 9, "column": 23 }, "identifierName": "peg$subclass" }, "name": "peg$subclass" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 142, "end": 147, "loc": { "start": { "line": 9, "column": 24 }, "end": { "line": 9, "column": 29 }, "identifierName": "child" }, "name": "child" }, { "type": "Identifier", "start": 149, "end": 155, "loc": { "start": { "line": 9, "column": 31 }, "end": { "line": 9, "column": 37 }, "identifierName": "parent" }, "name": "parent" } ], "body": { "type": "BlockStatement", "start": 157, "end": 289, "loc": { "start": { "line": 9, "column": 39 }, "end": { "line": 13, "column": 3 } }, "body": [ { "type": "FunctionDeclaration", "start": 164, "end": 209, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 49 } }, "id": { "type": "Identifier", "start": 173, "end": 177, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 17 }, "identifierName": "ctor" }, "name": "ctor" }, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 180, "end": 209, "loc": { "start": { "line": 10, "column": 20 }, "end": { "line": 10, "column": 49 } }, "body": [ { "type": "ExpressionStatement", "start": 182, "end": 207, "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 47 } }, "expression": { "type": "AssignmentExpression", "start": 182, "end": 206, "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 46 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 182, "end": 198, "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 38 } }, "object": { "type": "ThisExpression", "start": 182, "end": 186, "loc": { "start": { "line": 10, "column": 22 }, "end": { "line": 10, "column": 26 } } }, "property": { "type": "Identifier", "start": 187, "end": 198, "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 38 }, "identifierName": "constructor" }, "name": "constructor" }, "computed": false }, "right": { "type": "Identifier", "start": 201, "end": 206, "loc": { "start": { "line": 10, "column": 41 }, "end": { "line": 10, "column": 46 }, "identifierName": "child" }, "name": "child" } } } ], "directives": [] } }, { "type": "ExpressionStatement", "start": 215, "end": 249, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 215, "end": 248, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 215, "end": 229, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 18 } }, "object": { "type": "Identifier", "start": 215, "end": 219, "loc": { "start": { "line": 11, "column": 4 }, "end": { "line": 11, "column": 8 }, "identifierName": "ctor" }, "name": "ctor" }, "property": { "type": "Identifier", "start": 220, "end": 229, "loc": { "start": { "line": 11, "column": 9 }, "end": { "line": 11, "column": 18 }, "identifierName": "prototype" }, "name": "prototype" }, "computed": false }, "right": { "type": "MemberExpression", "start": 232, "end": 248, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 37 } }, "object": { "type": "Identifier", "start": 232, "end": 238, "loc": { "start": { "line": 11, "column": 21 }, "end": { "line": 11, "column": 27 }, "identifierName": "parent" }, "name": "parent" }, "property": { "type": "Identifier", "start": 239, "end": 248, "loc": { "start": { "line": 11, "column": 28 }, "end": { "line": 11, "column": 37 }, "identifierName": "prototype" }, "name": "prototype" }, "computed": false } } }, { "type": "ExpressionStatement", "start": 255, "end": 284, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 255, "end": 283, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 255, "end": 270, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 19 } }, "object": { "type": "Identifier", "start": 255, "end": 260, "loc": { "start": { "line": 12, "column": 4 }, "end": { "line": 12, "column": 9 }, "identifierName": "child" }, "name": "child" }, "property": { "type": "Identifier", "start": 261, "end": 270, "loc": { "start": { "line": 12, "column": 10 }, "end": { "line": 12, "column": 19 }, "identifierName": "prototype" }, "name": "prototype" }, "computed": false }, "right": { "type": "NewExpression", "start": 273, "end": 283, "loc": { "start": { "line": 12, "column": 22 }, "end": { "line": 12, "column": 32 } }, "callee": { "type": "Identifier", "start": 277, "end": 281, "loc": { "start": { "line": 12, "column": 26 }, "end": { "line": 12, "column": 30 }, "identifierName": "ctor" }, "name": "ctor" }, "arguments": [] } } } ], "directives": [] } }, { "type": "FunctionDeclaration", "start": 295, "end": 640, "loc": { "start": { "line": 15, "column": 2 }, "end": { "line": 25, "column": 3 } }, "id": { "type": "Identifier", "start": 304, "end": 319, "loc": { "start": { "line": 15, "column": 11 }, "end": { "line": 15, "column": 26 }, "identifierName": "peg$SyntaxError" }, "name": "peg$SyntaxError" }, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 320, "end": 327, "loc": { "start": { "line": 15, "column": 27 }, "end": { "line": 15, "column": 34 }, "identifierName": "message" }, "name": "message" }, { "type": "Identifier", "start": 329, "end": 337, "loc": { "start": { "line": 15, "column": 36 }, "end": { "line": 15, "column": 44 }, "identifierName": "expected" }, "name": "expected" }, { "type": "Identifier", "start": 339, "end": 344, "loc": { "start": { "line": 15, "column": 46 }, "end": { "line": 15, "column": 51 }, "identifierName": "found" }, "name": "found" }, { "type": "Identifier", "start": 346, "end": 354, "loc": { "start": { "line": 15, "column": 53 }, "end": { "line": 15, "column": 61 }, "identifierName": "location" }, "name": "location" } ], "body": { "type": "BlockStatement", "start": 356, "end": 640, "loc": { "start": { "line": 15, "column": 63 }, "end": { "line": 25, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 363, "end": 387, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 28 } }, "expression": { "type": "AssignmentExpression", "start": 363, "end": 386, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 27 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 363, "end": 375, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 16 } }, "object": { "type": "ThisExpression", "start": 363, "end": 367, "loc": { "start": { "line": 16, "column": 4 }, "end": { "line": 16, "column": 8 } } }, "property": { "type": "Identifier", "start": 368, "end": 375, "loc": { "start": { "line": 16, "column": 9 }, "end": { "line": 16, "column": 16 }, "identifierName": "message" }, "name": "message" }, "computed": false }, "right": { "type": "Identifier", "start": 379, "end": 386, "loc": { "start": { "line": 16, "column": 20 }, "end": { "line": 16, "column": 27 }, "identifierName": "message" }, "name": "message" } } }, { "type": "ExpressionStatement", "start": 393, "end": 418, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 393, "end": 417, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 393, "end": 406, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 17 } }, "object": { "type": "ThisExpression", "start": 393, "end": 397, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 17, "column": 8 } } }, "property": { "type": "Identifier", "start": 398, "end": 406, "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 17 }, "identifierName": "expected" }, "name": "expected" }, "computed": false }, "right": { "type": "Identifier", "start": 409, "end": 417, "loc": { "start": { "line": 17, "column": 20 }, "end": { "line": 17, "column": 28 }, "identifierName": "expected" }, "name": "expected" } } }, { "type": "ExpressionStatement", "start": 424, "end": 446, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 26 } }, "expression": { "type": "AssignmentExpression", "start": 424, "end": 445, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 25 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 424, "end": 434, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 14 } }, "object": { "type": "ThisExpression", "start": 424, "end": 428, "loc": { "start": { "line": 18, "column": 4 }, "end": { "line": 18, "column": 8 } } }, "property": { "type": "Identifier", "start": 429, "end": 434, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 14 }, "identifierName": "found" }, "name": "found" }, "computed": false }, "right": { "type": "Identifier", "start": 440, "end": 445, "loc": { "start": { "line": 18, "column": 20 }, "end": { "line": 18, "column": 25 }, "identifierName": "found" }, "name": "found" } } }, { "type": "ExpressionStatement", "start": 452, "end": 477, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 452, "end": 476, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 452, "end": 465, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 17 } }, "object": { "type": "ThisExpression", "start": 452, "end": 456, "loc": { "start": { "line": 19, "column": 4 }, "end": { "line": 19, "column": 8 } } }, "property": { "type": "Identifier", "start": 457, "end": 465, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 17 }, "identifierName": "location" }, "name": "location" }, "computed": false }, "right": { "type": "Identifier", "start": 468, "end": 476, "loc": { "start": { "line": 19, "column": 20 }, "end": { "line": 19, "column": 28 }, "identifierName": "location" }, "name": "location" } } }, { "type": "ExpressionStatement", "start": 483, "end": 513, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 34 } }, "expression": { "type": "AssignmentExpression", "start": 483, "end": 512, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 33 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 483, "end": 492, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 13 } }, "object": { "type": "ThisExpression", "start": 483, "end": 487, "loc": { "start": { "line": 20, "column": 4 }, "end": { "line": 20, "column": 8 } } }, "property": { "type": "Identifier", "start": 488, "end": 492, "loc": { "start": { "line": 20, "column": 9 }, "end": { "line": 20, "column": 13 }, "identifierName": "name" }, "name": "name" }, "computed": false }, "right": { "type": "StringLiteral", "start": 499, "end": 512, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 33 } }, "extra": { "rawValue": "SyntaxError", "raw": "\"SyntaxError\"" }, "value": "SyntaxError" } } }, { "type": "IfStatement", "start": 521, "end": 635, "loc": { "start": { "line": 22, "column": 4 }, "end": { "line": 24, "column": 5 } }, "test": { "type": "BinaryExpression", "start": 525, "end": 570, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 53 } }, "left": { "type": "UnaryExpression", "start": 525, "end": 555, "loc": { "start": { "line": 22, "column": 8 }, "end": { "line": 22, "column": 38 } }, "operator": "typeof",