awv3
Version:
⚡ AWV3 embedded CAD
1,530 lines (1,529 loc) • 216 kB
JSON
{
"type": "File",
"start": 0,
"end": 1323,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 44,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1323,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 44,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 36
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "Ccbaseref"
},
"name": "Ccbaseref"
}
}
],
"source": {
"type": "StringLiteral",
"start": 22,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 35
}
},
"extra": {
"rawValue": "./ccbaseref",
"raw": "'./ccbaseref'"
},
"value": "./ccbaseref"
}
},
{
"type": "ImportDeclaration",
"start": 37,
"end": 81,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 44
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 46,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 15
}
},
"imported": {
"type": "Identifier",
"start": 46,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 15
},
"identifierName": "Member"
},
"name": "Member"
},
"local": {
"type": "Identifier",
"start": 46,
"end": 52,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 15
},
"identifierName": "Member"
},
"name": "Member"
}
}
],
"source": {
"type": "StringLiteral",
"start": 60,
"end": 80,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 43
}
},
"extra": {
"rawValue": "./command/lowlevel",
"raw": "'./command/lowlevel'"
},
"value": "./command/lowlevel"
}
},
{
"type": "ImportDeclaration",
"start": 82,
"end": 121,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 39
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 91,
"end": 99,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 17
}
},
"imported": {
"type": "Identifier",
"start": 91,
"end": 99,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 17
},
"identifierName": "getClass"
},
"name": "getClass"
},
"local": {
"type": "Identifier",
"start": 91,
"end": 99,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 17
},
"identifierName": "getClass"
},
"name": "getClass"
}
}
],
"source": {
"type": "StringLiteral",
"start": 107,
"end": 120,
"loc": {
"start": {
"line": 3,
"column": 25
},
"end": {
"line": 3,
"column": 38
}
},
"extra": {
"rawValue": "./geomutils",
"raw": "'./geomutils'"
},
"value": "./geomutils"
},
"trailingComments": [
{
"type": "CommentLine",
"value": " Like a Ccref, but an object is not yet created,",
"start": 123,
"end": 173,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 50
}
}
},
{
"type": "CommentLine",
"value": " we have a command (AST expression) that evaluates to it and geomParams",
"start": 174,
"end": 247,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 73
}
}
}
]
},
{
"type": "VariableDeclaration",
"start": 248,
"end": 266,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 18
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 252,
"end": 265,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 17
}
},
"id": {
"type": "Identifier",
"start": 252,
"end": 261,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 13
},
"identifierName": "idCounter"
},
"name": "idCounter",
"leadingComments": null
},
"init": {
"type": "NumericLiteral",
"start": 264,
"end": 265,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 17
}
},
"extra": {
"rawValue": 0,
"raw": "0"
},
"value": 0
},
"leadingComments": null
}
],
"kind": "let",
"leadingComments": [
{
"type": "CommentLine",
"value": " Like a Ccref, but an object is not yet created,",
"start": 123,
"end": 173,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 50
}
}
},
{
"type": "CommentLine",
"value": " we have a command (AST expression) that evaluates to it and geomParams",
"start": 174,
"end": 247,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 73
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 267,
"end": 1322,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 43,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 282,
"end": 1322,
"loc": {
"start": {
"line": 8,
"column": 15
},
"end": {
"line": 43,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 288,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 21
},
"end": {
"line": 8,
"column": 30
},
"identifierName": "Ccfuturef"
},
"name": "Ccfuturef"
},
"superClass": {
"type": "Identifier",
"start": 306,
"end": 315,
"loc": {
"start": {
"line": 8,
"column": 39
},
"end": {
"line": 8,
"column": 48
},
"identifierName": "Ccbaseref"
},
"name": "Ccbaseref"
},
"body": {
"type": "ClassBody",
"start": 316,
"end": 1322,
"loc": {
"start": {
"line": 8,
"column": 49
},
"end": {
"line": 43,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 322,
"end": 642,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 16,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 322,
"end": 333,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 334,
"end": 341,
"loc": {
"start": {
"line": 9,
"column": 16
},
"end": {
"line": 9,
"column": 23
},
"identifierName": "command"
},
"name": "command"
},
{
"type": "Identifier",
"start": 343,
"end": 353,
"loc": {
"start": {
"line": 9,
"column": 25
},
"end": {
"line": 9,
"column": 35
},
"identifierName": "geomParams"
},
"name": "geomParams"
},
{
"type": "AssignmentPattern",
"start": 355,
"end": 373,
"loc": {
"start": {
"line": 9,
"column": 37
},
"end": {
"line": 9,
"column": 55
}
},
"left": {
"type": "Identifier",
"start": 355,
"end": 361,
"loc": {
"start": {
"line": 9,
"column": 37
},
"end": {
"line": 9,
"column": 43
},
"identifierName": "parent"
},
"name": "parent"
},
"right": {
"type": "Identifier",
"start": 364,
"end": 373,
"loc": {
"start": {
"line": 9,
"column": 46
},
"end": {
"line": 9,
"column": 55
},
"identifierName": "undefined"
},
"name": "undefined"
}
},
{
"type": "AssignmentPattern",
"start": 375,
"end": 396,
"loc": {
"start": {
"line": 9,
"column": 57
},
"end": {
"line": 9,
"column": 78
}
},
"left": {
"type": "Identifier",
"start": 375,
"end": 384,
"loc": {
"start": {
"line": 9,
"column": 57
},
"end": {
"line": 9,
"column": 66
},
"identifierName": "pointType"
},
"name": "pointType"
},
"right": {
"type": "Identifier",
"start": 387,
"end": 396,
"loc": {
"start": {
"line": 9,
"column": 69
},
"end": {
"line": 9,
"column": 78
},
"identifierName": "undefined"
},
"name": "undefined"
}
}
],
"body": {
"type": "BlockStatement",
"start": 398,
"end": 642,
"loc": {
"start": {
"line": 9,
"column": 80
},
"end": {
"line": 16,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 408,
"end": 416,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 16
}
},
"expression": {
"type": "CallExpression",
"start": 408,
"end": 415,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 15
}
},
"callee": {
"type": "Super",
"start": 408,
"end": 413,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 13
}
}
},
"arguments": []
}
},
{
"type": "ExpressionStatement",
"start": 425,
"end": 448,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 425,
"end": 447,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 425,
"end": 437,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 425,
"end": 429,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 430,
"end": 437,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 20
},
"identifierName": "command"
},
"name": "command"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 440,
"end": 447,
"loc": {
"start": {
"line": 11,
"column": 23
},
"end": {
"line": 11,
"column": 30
},
"identifierName": "command"
},
"name": "command"
}
}
},
{
"type": "ExpressionStatement",
"start": 457,
"end": 486,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 457,
"end": 485,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 457,
"end": 472,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 457,
"end": 461,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 462,
"end": 472,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 23
},
"identifierName": "geomParams"
},
"name": "geomParams"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 475,
"end": 485,
"loc": {
"start": {
"line": 12,
"column": 26
},
"end": {
"line": 12,
"column": 36
},
"identifierName": "geomParams"
},
"name": "geomParams"
}
}
},
{
"type": "ExpressionStatement",
"start": 495,
"end": 524,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 495,
"end": 523,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 495,
"end": 506,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 495,
"end": 499,
"loc": {
"start": {
"line": 13,
"column": 8
},
"end": {
"line": 13,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 500,
"end": 506,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 19
},
"identifierName": "parent"
},
"name": "parent"
},
"computed": false
},
"right": {
"type": "LogicalExpression",
"start": 509,
"end": 523,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 36
}
},
"left": {
"type": "Identifier",
"start": 509,
"end": 515,
"loc": {
"start": {
"line": 13,
"column": 22
},
"end": {
"line": 13,
"column": 28
},
"identifierName": "parent"
},
"name": "parent"
},
"operator": "||",
"right": {
"type": "ThisExpression",
"start": 519,
"end": 523,
"loc": {
"start": {
"line": 13,
"column": 32
},
"end": {
"line": 13,
"column": 36
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"start": 533,
"end": 605,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 80
}
},
"expression": {
"type": "AssignmentExpression",
"start": 533,
"end": 604,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 79
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 533,
"end": 547,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 533,
"end": 537,
"loc": {
"start": {
"line": 14,
"column": 8
},
"end": {
"line": 14,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 538,
"end": 547,
"loc": {
"start": {
"line": 14,
"column": 13
},
"end": {
"line": 14,
"column": 22
},
"identifierName": "pointType"
},
"name": "pointType"
},
"computed": false
},
"right": {
"type": "ConditionalExpression",
"start": 550,
"end": 604,
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 79
}
},
"test": {
"type": "Identifier",
"start": 550,
"end": 559,
"loc": {
"start": {
"line": 14,
"column": 25
},
"end": {
"line": 14,
"column": 34
},
"identifierName": "pointType"
},
"name": "pointType"
},
"consequent": {
"type": "CallExpression",
"start": 562,
"end": 592,
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 67
}
},
"callee": {
"type": "MemberExpression",
"start": 562,
"end": 579,
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 54
}
},
"object": {
"type": "Identifier",
"start": 562,
"end": 571,
"loc": {
"start": {
"line": 14,
"column": 37
},
"end": {
"line": 14,
"column": 46
},
"identifierName": "pointType"
},
"name": "pointType"
},
"property": {
"type": "Identifier",
"start": 572,
"end": 579,
"loc": {
"start": {
"line": 14,
"column": 47
},
"end": {
"line": 14,
"column": 54
},
"identifierName": "replace"
},
"name": "replace"
},
"computed": false
},
"arguments": [
{
"type": "StringLiteral",
"start": 580,
"end": 587,
"loc": {
"start": {
"line": 14,
"column": 55
},
"end": {
"line": 14,
"column": 62
}
},
"extra": {
"rawValue": "Point",
"raw": "'Point'"
},
"value": "Point"
},
{
"type": "StringLiteral",
"start": 589,
"end": 591,
"loc": {
"start": {
"line": 14,
"column": 64
},
"end": {
"line": 14,
"column": 66
}
},
"extra": {
"rawValue": "",
"raw": "''"
},
"value": ""
}
]
},
"alternate": {
"type": "Identifier",
"start": 595,
"end": 604,
"loc": {
"start": {
"line": 14,
"column": 70
},
"end": {
"line": 14,
"column": 79
},
"identifierName": "undefined"
},
"name": "undefined"
}
}
}
},
{
"type": "ExpressionStatement",
"start": 614,
"end": 636,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 30
}
},
"expression": {
"type": "AssignmentExpression",
"start": 614,
"end": 635,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 29
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 614,
"end": 621,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 614,
"end": 618,
"loc": {
"start": {
"line": 15,
"column": 8
},
"end": {
"line": 15,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 619,
"end": 621,
"loc": {
"start": {
"line": 15,
"column": 13
},
"end": {
"line": 15,
"column": 15
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"right": {
"type": "UpdateExpression",
"start": 624,
"end": 635,
"loc": {
"start": {
"line": 15,
"column": 18
},
"end": {
"line": 15,
"column": 29
}
},
"operator": "--",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 626,
"end": 635,
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 29
},
"identifierName": "idCounter"
},
"name": "idCounter"
},
"extra": {
"parenthesizedArgument": false
}
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 648,
"end": 709,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 20,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 652,
"end": 657,
"loc": {
"start": {
"line": 18,
"column": 8
},
"end": {
"line": 18,
"column": 13
},
"identifierName": "class"
},
"name": "class"
},
"static": false,
"kind": "get",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 660,
"end": 709,
"loc": {
"start": {
"line": 18,
"column": 16
},
"end": {
"line": 20,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 670,
"end": 703,
"loc": {
"start": {
"line": 19,
"column": 8
},
"end": {
"line": 19,
"column": 41
}
},
"argument": {
"type": "CallExpression",
"start": 677,
"end": 702,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 19,
"column": 40
}
},
"callee": {
"type": "Identifier",
"start": 677,
"end": 685,
"loc": {
"start": {
"line": 19,
"column": 15
},
"end": {
"line": 19,
"column": 23
},
"identifierName": "getClass"
},
"name": "getClass"
},
"arguments": [
{
"type": "MemberExpression",
"start": 686,
"end": 701,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 39
}
},
"object": {
"type": "ThisExpression",
"start": 686,
"end": 690,
"loc": {
"start": {
"line": 19,
"column": 24
},
"end": {
"line": 19,
"column": 28
}
}
},
"property": {
"type": "Identifier",
"start": 691,
"end": 701,
"loc": {