UNPKG

awv3

Version:
1,820 lines (1,819 loc) 69.1 kB
{ "type": "File", "start": 0, "end": 436, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 12, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 436, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 12, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 24, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 10, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 10 } }, "local": { "type": "Identifier", "start": 7, "end": 10, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 10 }, "identifierName": "Arc" }, "name": "Arc" } } ], "source": { "type": "StringLiteral", "start": 16, "end": 23, "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 23 } }, "extra": { "rawValue": "./arc", "raw": "'./arc'" }, "value": "./arc" } }, { "type": "ImportDeclaration", "start": 25, "end": 59, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 34 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 32, "end": 44, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } }, "local": { "type": "Identifier", "start": 32, "end": 44, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics" } } ], "source": { "type": "StringLiteral", "start": 50, "end": 58, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 33 } }, "extra": { "rawValue": "./base", "raw": "'./base'" }, "value": "./base" } }, { "type": "ExportDefaultDeclaration", "start": 61, "end": 435, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 11, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 76, "end": 435, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 11, "column": 1 } }, "id": { "type": "Identifier", "start": 82, "end": 88, "loc": { "start": { "line": 4, "column": 21 }, "end": { "line": 4, "column": 27 }, "identifierName": "Circle" }, "name": "Circle" }, "superClass": { "type": "Identifier", "start": 97, "end": 100, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 39 }, "identifierName": "Arc" }, "name": "Arc" }, "body": { "type": "ClassBody", "start": 101, "end": 435, "loc": { "start": { "line": 4, "column": 40 }, "end": { "line": 11, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 107, "end": 433, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 10, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 107, "end": 127, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 24 }, "identifierName": "updateFromGeomParams" }, "name": "updateFromGeomParams" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 128, "end": 138, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 35 }, "identifierName": "geomParams" }, "name": "geomParams" } ], "body": { "type": "BlockStatement", "start": 140, "end": 433, "loc": { "start": { "line": 5, "column": 37 }, "end": { "line": 10, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 227, "end": 294, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 75 } }, "expression": { "type": "CallExpression", "start": 227, "end": 293, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 74 } }, "callee": { "type": "MemberExpression", "start": 227, "end": 275, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 56 } }, "object": { "type": "MemberExpression", "start": 227, "end": 270, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 51 } }, "object": { "type": "MemberExpression", "start": 227, "end": 249, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 30 } }, "object": { "type": "Identifier", "start": 227, "end": 239, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 20 }, "identifierName": "BaseGraphics" }, "name": "BaseGraphics", "leadingComments": null }, "property": { "type": "Identifier", "start": 240, "end": 249, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 30 }, "identifierName": "prototype" }, "name": "prototype" }, "computed": false, "leadingComments": null }, "property": { "type": "Identifier", "start": 250, "end": 270, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 51 }, "identifierName": "updateFromGeomParams" }, "name": "updateFromGeomParams" }, "computed": false, "leadingComments": null }, "property": { "type": "Identifier", "start": 271, "end": 275, "loc": { "start": { "line": 7, "column": 52 }, "end": { "line": 7, "column": 56 }, "identifierName": "call" }, "name": "call" }, "computed": false, "leadingComments": null }, "arguments": [ { "type": "ThisExpression", "start": 276, "end": 280, "loc": { "start": { "line": 7, "column": 57 }, "end": { "line": 7, "column": 61 } } }, { "type": "Identifier", "start": 282, "end": 292, "loc": { "start": { "line": 7, "column": 63 }, "end": { "line": 7, "column": 73 }, "identifierName": "geomParams" }, "name": "geomParams" } ], "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " call grandparent (BaseGraphics) method, skipping parent (Arc) one", "start": 150, "end": 218, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 76 } } } ] }, { "type": "ExpressionStatement", "start": 303, "end": 397, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 102 } }, "expression": { "type": "CallExpression", "start": 303, "end": 396, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 101 } }, "callee": { "type": "MemberExpression", "start": 303, "end": 324, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 29 } }, "object": { "type": "ThisExpression", "start": 303, "end": 307, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } } }, "property": { "type": "Identifier", "start": 308, "end": 324, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 29 }, "identifierName": "updateWithAngles" }, "name": "updateWithAngles" }, "computed": false }, "arguments": [ { "type": "MemberExpression", "start": 325, "end": 342, "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 8, "column": 47 } }, "object": { "type": "Identifier", "start": 325, "end": 335, "loc": { "start": { "line": 8, "column": 30 }, "end": { "line": 8, "column": 40 }, "identifierName": "geomParams" }, "name": "geomParams" }, "property": { "type": "Identifier", "start": 336, "end": 342, "loc": { "start": { "line": 8, "column": 41 }, "end": { "line": 8, "column": 47 }, "identifierName": "center" }, "name": "center" }, "computed": false }, { "type": "MemberExpression", "start": 344, "end": 361, "loc": { "start": { "line": 8, "column": 49 }, "end": { "line": 8, "column": 66 } }, "object": { "type": "Identifier", "start": 344, "end": 354, "loc": { "start": { "line": 8, "column": 49 }, "end": { "line": 8, "column": 59 }, "identifierName": "geomParams" }, "name": "geomParams" }, "property": { "type": "Identifier", "start": 355, "end": 361, "loc": { "start": { "line": 8, "column": 60 }, "end": { "line": 8, "column": 66 }, "identifierName": "radius" }, "name": "radius" }, "computed": false }, { "type": "NumericLiteral", "start": 363, "end": 364, "loc": { "start": { "line": 8, "column": 68 }, "end": { "line": 8, "column": 69 } }, "extra": { "rawValue": 0, "raw": "0" }, "value": 0 }, { "type": "BinaryExpression", "start": 366, "end": 377, "loc": { "start": { "line": 8, "column": 71 }, "end": { "line": 8, "column": 82 } }, "left": { "type": "NumericLiteral", "start": 366, "end": 367, "loc": { "start": { "line": 8, "column": 71 }, "end": { "line": 8, "column": 72 } }, "extra": { "rawValue": 2, "raw": "2" }, "value": 2 }, "operator": "*", "right": { "type": "MemberExpression", "start": 370, "end": 377, "loc": { "start": { "line": 8, "column": 75 }, "end": { "line": 8, "column": 82 } }, "object": { "type": "Identifier", "start": 370, "end": 374, "loc": { "start": { "line": 8, "column": 75 }, "end": { "line": 8, "column": 79 }, "identifierName": "Math" }, "name": "Math" }, "property": { "type": "Identifier", "start": 375, "end": 377, "loc": { "start": { "line": 8, "column": 80 }, "end": { "line": 8, "column": 82 }, "identifierName": "PI" }, "name": "PI" }, "computed": false } }, { "type": "MemberExpression", "start": 379, "end": 395, "loc": { "start": { "line": 8, "column": 84 }, "end": { "line": 8, "column": 100 } }, "object": { "type": "Identifier", "start": 379, "end": 389, "loc": { "start": { "line": 8, "column": 84 }, "end": { "line": 8, "column": 94 }, "identifierName": "geomParams" }, "name": "geomParams" }, "property": { "type": "Identifier", "start": 390, "end": 395, "loc": { "start": { "line": 8, "column": 95 }, "end": { "line": 8, "column": 100 }, "identifierName": "scale" }, "name": "scale" }, "computed": false } ] } }, { "type": "ExpressionStatement", "start": 406, "end": 427, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 29 } }, "expression": { "type": "CallExpression", "start": 406, "end": 426, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 28 } }, "callee": { "type": "MemberExpression", "start": 406, "end": 424, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 26 } }, "object": { "type": "ThisExpression", "start": 406, "end": 410, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 12 } } }, "property": { "type": "Identifier", "start": 411, "end": 424, "loc": { "start": { "line": 9, "column": 13 }, "end": { "line": 9, "column": 26 }, "identifierName": "updateMetaBox" }, "name": "updateMetaBox" }, "computed": false }, "arguments": [] } } ], "directives": [] } } ] }, "leadingComments": [], "trailingComments": [] } } ], "directives": [] }, "comments": [ { "type": "CommentLine", "value": " call grandparent (BaseGraphics) method, skipping parent (Arc) one", "start": 150, "end": 218, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 76 } } } ], "tokens": [ { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": false, "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": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Arc", "start": 7, "end": 10, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 10 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 11, "end": 15, "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 15 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./arc", "start": 16, "end": 23, "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 23 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 23, "end": 24, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": { "label": "import", "keyword": "import", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "import", "start": 25, "end": 31, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 6 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "BaseGraphics", "start": 32, "end": 44, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 19 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "from", "start": 45, "end": 49, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 24 } } }, { "type": { "label": "string", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "./base", "start": 50, "end": 58, "loc": { "start": { "line": 2, "column": 25 }, "end": { "line": 2, "column": 33 } } }, { "type": { "label": ";", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 58, "end": 59, "loc": { "start": { "line": 2, "column": 33 }, "end": { "line": 2, "column": 34 } } }, { "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": 61, "end": 67, "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 6 } } }, { "type": { "label": "default", "keyword": "default", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "value": "default", "start": 68, "end": 75, "loc": { "start": { "line": 4, "column": 7 }, "end": { "line": 4, "column": 14 } } }, { "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": 76, "end": 81, "loc": { "start": { "line": 4, "column": 15 }, "end": { "line": 4, "column": 20 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "Circle", "start": 82, "end": 88, "loc": { "start": { "line": 4, "column": 21 }, "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": 89, "end": 96, "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": "Arc", "start": 97, "end": 100, "loc": { "start": { "line": 4, "column": 36 }, "end": { "line": 4, "column": 39 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 101, "end": 102, "loc": { "start": { "line": 4, "column": 40 }, "end": { "line": 4, "column": 41 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "updateFromGeomParams", "start": 107, "end": 127, "loc": { "start": { "line": 5, "column": 4 }, "end": { "line": 5, "column": 24 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 127, "end": 128, "loc": { "start": { "line": 5, "column": 24 }, "end": { "line": 5, "column": 25 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "geomParams", "start": 128, "end": 138, "loc": { "start": { "line": 5, "column": 25 }, "end": { "line": 5, "column": 35 } } }, { "type": { "label": ")", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 138, "end": 139, "loc": { "start": { "line": 5, "column": 35 }, "end": { "line": 5, "column": 36 } } }, { "type": { "label": "{", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 140, "end": 141, "loc": { "start": { "line": 5, "column": 37 }, "end": { "line": 5, "column": 38 } } }, { "type": "CommentLine", "value": " call grandparent (BaseGraphics) method, skipping parent (Arc) one", "start": 150, "end": 218, "loc": { "start": { "line": 6, "column": 8 }, "end": { "line": 6, "column": 76 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "BaseGraphics", "start": 227, "end": 239, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 20 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 239, "end": 240, "loc": { "start": { "line": 7, "column": 20 }, "end": { "line": 7, "column": 21 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "prototype", "start": 240, "end": 249, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 30 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 249, "end": 250, "loc": { "start": { "line": 7, "column": 30 }, "end": { "line": 7, "column": 31 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "updateFromGeomParams", "start": 250, "end": 270, "loc": { "start": { "line": 7, "column": 31 }, "end": { "line": 7, "column": 51 } } }, { "type": { "label": ".", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, "start": 270, "end": 271, "loc": { "start": { "line": 7, "column": 51 }, "end": { "line": 7, "column": 52 } } }, { "type": { "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "value": "call", "start": 271, "end": 275, "loc": { "start": { "line": 7, "column": 52 }, "end": { "line": 7, "column": 56 } } }, { "type": { "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, "binop": null }, "start": 275, "end": 276, "loc": { "start": { "line": 7, "column": 56 }, "end": { "line": 7, "column": 57 } } }, { "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": 276, "end": 280, "loc": { "start": { "line": 7, "column": 57 }, "end": { "line": 7, "column": 61 } } }, { "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": 7, "column": 61