UNPKG

awv3

Version:
1,496 lines (1,495 loc) 912 kB
{ "type": "File", "start": 0, "end": 4848, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 131, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 4848, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 131, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 50, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 50 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 9, "end": 19, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } }, "imported": { "type": "Identifier", "start": 9, "end": 19, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 }, "identifierName": "addCommand" }, "name": "addCommand" }, "local": { "type": "Identifier", "start": 9, "end": 19, "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 }, "identifierName": "addCommand" }, "name": "addCommand" } } ], "source": { "type": "StringLiteral", "start": 27, "end": 49, "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 49 } }, "extra": { "rawValue": "../command/highlevel", "raw": "'../command/highlevel'" }, "value": "../command/highlevel" } }, { "type": "ImportDeclaration", "start": 51, "end": 84, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 33 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 58, "end": 68, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 17 } }, "local": { "type": "Identifier", "start": 58, "end": 68, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 17 }, "identifierName": "Constraint" }, "name": "Constraint" } } ], "source": { "type": "StringLiteral", "start": 74, "end": 83, "loc": { "start": { "line": 2, "column": 23 }, "end": { "line": 2, "column": 32 } }, "extra": { "rawValue": "./index", "raw": "'./index'" }, "value": "./index" } }, { "type": "ImportDeclaration", "start": 85, "end": 148, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 63 } }, "specifiers": [ { "type": "ImportSpecifier", "start": 94, "end": 103, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 18 } }, "imported": { "type": "Identifier", "start": 94, "end": 103, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 18 }, "identifierName": "incidence" }, "name": "incidence" }, "local": { "type": "Identifier", "start": 94, "end": 103, "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 18 }, "identifierName": "incidence" }, "name": "incidence" } }, { "type": "ImportSpecifier", "start": 105, "end": 118, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 33 } }, "imported": { "type": "Identifier", "start": 105, "end": 118, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 33 }, "identifierName": "horizontality" }, "name": "horizontality" }, "local": { "type": "Identifier", "start": 105, "end": 118, "loc": { "start": { "line": 3, "column": 20 }, "end": { "line": 3, "column": 33 }, "identifierName": "horizontality" }, "name": "horizontality" } }, { "type": "ImportSpecifier", "start": 120, "end": 131, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 46 } }, "imported": { "type": "Identifier", "start": 120, "end": 131, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 46 }, "identifierName": "verticality" }, "name": "verticality" }, "local": { "type": "Identifier", "start": 120, "end": 131, "loc": { "start": { "line": 3, "column": 35 }, "end": { "line": 3, "column": 46 }, "identifierName": "verticality" }, "name": "verticality" } } ], "source": { "type": "StringLiteral", "start": 139, "end": 147, "loc": { "start": { "line": 3, "column": 54 }, "end": { "line": 3, "column": 62 } }, "extra": { "rawValue": "./type", "raw": "'./type'" }, "value": "./type" } }, { "type": "ExportDefaultDeclaration", "start": 150, "end": 3321, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 79, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 165, "end": 3321, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 79, "column": 1 } }, "id": { "type": "Identifier", "start": 171, "end": 186, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 36 }, "identifierName": "ConstraintAdder" }, "name": "ConstraintAdder" }, "superClass": null, "body": { "type": "ClassBody", "start": 187, "end": 3321, "loc": { "start": { "line": 5, "column": 37 }, "end": { "line": 79, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 193, "end": 791, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 21, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 193, "end": 204, "loc": { "start": { "line": 6, "column": 4 }, "end": { "line": 6, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 205, "end": 211, "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 6, "column": 22 }, "identifierName": "sketch" }, "name": "sketch" } ], "body": { "type": "BlockStatement", "start": 213, "end": 791, "loc": { "start": { "line": 6, "column": 24 }, "end": { "line": 21, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 280, "end": 301, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 29 } }, "expression": { "type": "AssignmentExpression", "start": 280, "end": 300, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 28 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 280, "end": 291, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 19 } }, "object": { "type": "ThisExpression", "start": 280, "end": 284, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 8, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 285, "end": 291, "loc": { "start": { "line": 8, "column": 13 }, "end": { "line": 8, "column": 19 }, "identifierName": "sketch" }, "name": "sketch" }, "computed": false, "leadingComments": null }, "right": { "type": "Identifier", "start": 294, "end": 300, "loc": { "start": { "line": 8, "column": 22 }, "end": { "line": 8, "column": 28 }, "identifierName": "sketch" }, "name": "sketch" }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " the sketch we are going to add constraints to", "start": 223, "end": 271, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 56 } } } ], "trailingComments": [ { "type": "CommentLine", "value": " the list of constraint geomParams which really should be added", "start": 310, "end": 375, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 73 } } } ] }, { "type": "ExpressionStatement", "start": 384, "end": 406, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 30 } }, "expression": { "type": "AssignmentExpression", "start": 384, "end": 405, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 29 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 384, "end": 400, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 24 } }, "object": { "type": "ThisExpression", "start": 384, "end": 388, "loc": { "start": { "line": 10, "column": 8 }, "end": { "line": 10, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 389, "end": 400, "loc": { "start": { "line": 10, "column": 13 }, "end": { "line": 10, "column": 24 }, "identifierName": "constraints" }, "name": "constraints" }, "computed": false, "leadingComments": null }, "right": { "type": "ArrayExpression", "start": 403, "end": 405, "loc": { "start": { "line": 10, "column": 27 }, "end": { "line": 10, "column": 29 } }, "elements": [] }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " the list of constraint geomParams which really should be added", "start": 310, "end": 375, "loc": { "start": { "line": 9, "column": 8 }, "end": { "line": 9, "column": 73 } } } ], "trailingComments": [ { "type": "CommentLine", "value": " dsu structures for incident and inc-tangent point groups", "start": 416, "end": 475, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 67 } } } ] }, { "type": "ExpressionStatement", "start": 484, "end": 514, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 38 } }, "expression": { "type": "AssignmentExpression", "start": 484, "end": 513, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 37 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 484, "end": 501, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 25 } }, "object": { "type": "ThisExpression", "start": 484, "end": 488, "loc": { "start": { "line": 13, "column": 8 }, "end": { "line": 13, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 489, "end": 501, "loc": { "start": { "line": 13, "column": 13 }, "end": { "line": 13, "column": 25 }, "identifierName": "incidenceDsu" }, "name": "incidenceDsu" }, "computed": false, "leadingComments": null }, "right": { "type": "NewExpression", "start": 504, "end": 513, "loc": { "start": { "line": 13, "column": 28 }, "end": { "line": 13, "column": 37 } }, "callee": { "type": "Identifier", "start": 508, "end": 511, "loc": { "start": { "line": 13, "column": 32 }, "end": { "line": 13, "column": 35 }, "identifierName": "DSU" }, "name": "DSU" }, "arguments": [] }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " dsu structures for incident and inc-tangent point groups", "start": 416, "end": 475, "loc": { "start": { "line": 12, "column": 8 }, "end": { "line": 12, "column": 67 } } } ], "trailingComments": [ { "type": "CommentLine", "value": "this.tangencyDsu = new DSU(); // TODO!", "start": 523, "end": 566, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 51 } } }, { "type": "CommentLine", "value": " sets of horizontal and vertical lines", "start": 575, "end": 615, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 48 } } } ] }, { "type": "ExpressionStatement", "start": 624, "end": 655, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 39 } }, "expression": { "type": "AssignmentExpression", "start": 624, "end": 654, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 38 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 624, "end": 642, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 26 } }, "object": { "type": "ThisExpression", "start": 624, "end": 628, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 629, "end": 642, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 16, "column": 26 }, "identifierName": "horizontalSet" }, "name": "horizontalSet" }, "computed": false, "leadingComments": null }, "right": { "type": "NewExpression", "start": 645, "end": 654, "loc": { "start": { "line": 16, "column": 29 }, "end": { "line": 16, "column": 38 } }, "callee": { "type": "Identifier", "start": 649, "end": 652, "loc": { "start": { "line": 16, "column": 33 }, "end": { "line": 16, "column": 36 }, "identifierName": "Set" }, "name": "Set" }, "arguments": [] }, "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": "this.tangencyDsu = new DSU(); // TODO!", "start": 523, "end": 566, "loc": { "start": { "line": 14, "column": 8 }, "end": { "line": 14, "column": 51 } } }, { "type": "CommentLine", "value": " sets of horizontal and vertical lines", "start": 575, "end": 615, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 48 } } } ] }, { "type": "ExpressionStatement", "start": 664, "end": 693, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 37 } }, "expression": { "type": "AssignmentExpression", "start": 664, "end": 692, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 36 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 664, "end": 680, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 24 } }, "object": { "type": "ThisExpression", "start": 664, "end": 668, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 12 } } }, "property": { "type": "Identifier", "start": 669, "end": 680, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 24 }, "identifierName": "verticalSet" }, "name": "verticalSet" }, "computed": false }, "right": { "type": "NewExpression", "start": 683, "end": 692, "loc": { "start": { "line": 17, "column": 27 }, "end": { "line": 17, "column": 36 } }, "callee": { "type": "Identifier", "start": 687, "end": 690, "loc": { "start": { "line": 17, "column": 31 }, "end": { "line": 17, "column": 34 }, "identifierName": "Set" }, "name": "Set" }, "arguments": [] } }, "trailingComments": [ { "type": "CommentLine", "value": " preprocess all objects and constraints currently on sketch", "start": 703, "end": 764, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 69 } } } ] }, { "type": "ExpressionStatement", "start": 773, "end": 785, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 20 } }, "expression": { "type": "CallExpression", "start": 773, "end": 784, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 19 } }, "callee": { "type": "MemberExpression", "start": 773, "end": 782, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 17 } }, "object": { "type": "ThisExpression", "start": 773, "end": 777, "loc": { "start": { "line": 20, "column": 8 }, "end": { "line": 20, "column": 12 } }, "leadingComments": null }, "property": { "type": "Identifier", "start": 778, "end": 782, "loc": { "start": { "line": 20, "column": 13 }, "end": { "line": 20, "column": 17 }, "identifierName": "init" }, "name": "init" }, "computed": false, "leadingComments": null }, "arguments": [], "leadingComments": null }, "leadingComments": [ { "type": "CommentLine", "value": " preprocess all objects and constraints currently on sketch", "start": 703, "end": 764, "loc": { "start": { "line": 19, "column": 8 }, "end": { "line": 19, "column": 69 } } } ] } ], "directives": [] } }, { "type": "ClassMethod", "start": 797, "end": 1402, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 38, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 797, "end": 801, "loc": { "start": { "line": 23, "column": 4 }, "end": { "line": 23, "column": 8 }, "identifierName": "init" }, "name": "init" }, "static": false, "kind": "method", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 804, "end": 1402, "loc": { "start": { "line": 23, "column": 11 }, "end": { "line": 38, "column": 5 } }, "body": [ { "type": "ForOfStatement", "start": 867, "end": 1396, "loc": { "start": { "line": 25, "column": 8 }, "end": { "line": 37, "column": 9 } }, "left": { "type": "VariableDeclaration", "start": 872, "end": 882, "loc": { "start": { "line": 25, "column": 13 }, "end": { "line": 25, "column": 23 } }, "declarations": [ { "type": "VariableDeclarator", "start": 876, "end": 882, "loc": { "start": { "line": 25, "column": 17 }, "end": { "line": 25, "column": 23 } }, "id": { "type": "Identifier", "start": 876, "end": 882, "loc": { "start": { "line": 25, "column": 17 }, "end": { "line": 25, "column": 23 }, "identifierName": "object" }, "name": "object", "leadingComments": null }, "init": null, "leadingComments": null } ], "kind": "let", "leadingComments": null }, "right": { "type": "MemberExpression", "start": 886, "end": 906, "loc": { "start": { "line": 25, "column": 27 }, "end": { "line": 25, "column": 47 } }, "object": { "type": "MemberExpression", "start": 886, "end": 897, "loc": { "start": { "line": 25, "column": 27 }, "end": { "line": 25, "column": 38 } }, "object": { "type": "ThisExpression", "start": 886, "end": 890, "loc": { "start": { "line": 25, "column": 27 }, "end": { "line": 25, "column": 31 } } }, "property": { "type": "Identifier", "start": 891, "end": 897, "loc": { "start": { "line": 25, "column": 32 },