awv3
Version:
⚡ AWV3 embedded CAD
1,486 lines (1,485 loc) • 331 kB
JSON
{
"type": "File",
"start": 0,
"end": 1768,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 64,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 1768,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 64,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 42,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 42
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 8,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 14
}
},
"imported": {
"type": "Identifier",
"start": 8,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 14
},
"identifierName": "Member"
},
"name": "Member"
},
"local": {
"type": "Identifier",
"start": 8,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 14
},
"identifierName": "Member"
},
"name": "Member"
}
}
],
"source": {
"type": "StringLiteral",
"start": 21,
"end": 41,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 41
}
},
"extra": {
"rawValue": "./command/lowlevel",
"raw": "'./command/lowlevel'"
},
"value": "./command/lowlevel"
},
"trailingComments": [
{
"type": "CommentLine",
"value": " Like a Ccref, but an object is not yet created,",
"start": 44,
"end": 94,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 50
}
}
},
{
"type": "CommentLine",
"value": " we have a command (AST expression) that evaluates to it and geomParams",
"start": 95,
"end": 168,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 73
}
}
}
]
},
{
"type": "VariableDeclaration",
"start": 169,
"end": 187,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 18
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 173,
"end": 186,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 17
}
},
"id": {
"type": "Identifier",
"start": 173,
"end": 182,
"loc": {
"start": {
"line": 5,
"column": 4
},
"end": {
"line": 5,
"column": 13
},
"identifierName": "idCounter"
},
"name": "idCounter",
"leadingComments": null
},
"init": {
"type": "NumericLiteral",
"start": 185,
"end": 186,
"loc": {
"start": {
"line": 5,
"column": 16
},
"end": {
"line": 5,
"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": 44,
"end": 94,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 50
}
}
},
{
"type": "CommentLine",
"value": " we have a command (AST expression) that evaluates to it and geomParams",
"start": 95,
"end": 168,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 73
}
}
}
]
},
{
"type": "ExportDefaultDeclaration",
"start": 188,
"end": 1767,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 63,
"column": 1
}
},
"declaration": {
"type": "ClassDeclaration",
"start": 203,
"end": 1767,
"loc": {
"start": {
"line": 6,
"column": 15
},
"end": {
"line": 63,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 209,
"end": 218,
"loc": {
"start": {
"line": 6,
"column": 21
},
"end": {
"line": 6,
"column": 30
},
"identifierName": "Ccfuturef"
},
"name": "Ccfuturef"
},
"superClass": null,
"body": {
"type": "ClassBody",
"start": 219,
"end": 1767,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 63,
"column": 1
}
},
"body": [
{
"type": "ClassMethod",
"start": 225,
"end": 483,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 13,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 225,
"end": 236,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 15
},
"identifierName": "constructor"
},
"name": "constructor"
},
"static": false,
"kind": "constructor",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 237,
"end": 244,
"loc": {
"start": {
"line": 7,
"column": 16
},
"end": {
"line": 7,
"column": 23
},
"identifierName": "command"
},
"name": "command"
},
{
"type": "Identifier",
"start": 246,
"end": 256,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 35
},
"identifierName": "geomParams"
},
"name": "geomParams"
},
{
"type": "AssignmentPattern",
"start": 258,
"end": 276,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 7,
"column": 55
}
},
"left": {
"type": "Identifier",
"start": 258,
"end": 264,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 7,
"column": 43
},
"identifierName": "parent"
},
"name": "parent"
},
"right": {
"type": "Identifier",
"start": 267,
"end": 276,
"loc": {
"start": {
"line": 7,
"column": 46
},
"end": {
"line": 7,
"column": 55
},
"identifierName": "undefined"
},
"name": "undefined"
}
},
{
"type": "AssignmentPattern",
"start": 278,
"end": 299,
"loc": {
"start": {
"line": 7,
"column": 57
},
"end": {
"line": 7,
"column": 78
}
},
"left": {
"type": "Identifier",
"start": 278,
"end": 287,
"loc": {
"start": {
"line": 7,
"column": 57
},
"end": {
"line": 7,
"column": 66
},
"identifierName": "pointType"
},
"name": "pointType"
},
"right": {
"type": "Identifier",
"start": 290,
"end": 299,
"loc": {
"start": {
"line": 7,
"column": 69
},
"end": {
"line": 7,
"column": 78
},
"identifierName": "undefined"
},
"name": "undefined"
}
}
],
"body": {
"type": "BlockStatement",
"start": 301,
"end": 483,
"loc": {
"start": {
"line": 7,
"column": 80
},
"end": {
"line": 13,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 311,
"end": 334,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 31
}
},
"expression": {
"type": "AssignmentExpression",
"start": 311,
"end": 333,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 30
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 311,
"end": 323,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 20
}
},
"object": {
"type": "ThisExpression",
"start": 311,
"end": 315,
"loc": {
"start": {
"line": 8,
"column": 8
},
"end": {
"line": 8,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 316,
"end": 323,
"loc": {
"start": {
"line": 8,
"column": 13
},
"end": {
"line": 8,
"column": 20
},
"identifierName": "command"
},
"name": "command"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 326,
"end": 333,
"loc": {
"start": {
"line": 8,
"column": 23
},
"end": {
"line": 8,
"column": 30
},
"identifierName": "command"
},
"name": "command"
}
}
},
{
"type": "ExpressionStatement",
"start": 343,
"end": 372,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 343,
"end": 371,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 343,
"end": 358,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 23
}
},
"object": {
"type": "ThisExpression",
"start": 343,
"end": 347,
"loc": {
"start": {
"line": 9,
"column": 8
},
"end": {
"line": 9,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 348,
"end": 358,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 23
},
"identifierName": "geomParams"
},
"name": "geomParams"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 361,
"end": 371,
"loc": {
"start": {
"line": 9,
"column": 26
},
"end": {
"line": 9,
"column": 36
},
"identifierName": "geomParams"
},
"name": "geomParams"
}
}
},
{
"type": "ExpressionStatement",
"start": 381,
"end": 410,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 37
}
},
"expression": {
"type": "AssignmentExpression",
"start": 381,
"end": 409,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 36
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 381,
"end": 392,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 19
}
},
"object": {
"type": "ThisExpression",
"start": 381,
"end": 385,
"loc": {
"start": {
"line": 10,
"column": 8
},
"end": {
"line": 10,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 386,
"end": 392,
"loc": {
"start": {
"line": 10,
"column": 13
},
"end": {
"line": 10,
"column": 19
},
"identifierName": "parent"
},
"name": "parent"
},
"computed": false
},
"right": {
"type": "LogicalExpression",
"start": 395,
"end": 409,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 36
}
},
"left": {
"type": "Identifier",
"start": 395,
"end": 401,
"loc": {
"start": {
"line": 10,
"column": 22
},
"end": {
"line": 10,
"column": 28
},
"identifierName": "parent"
},
"name": "parent"
},
"operator": "||",
"right": {
"type": "ThisExpression",
"start": 405,
"end": 409,
"loc": {
"start": {
"line": 10,
"column": 32
},
"end": {
"line": 10,
"column": 36
}
}
}
}
}
},
{
"type": "ExpressionStatement",
"start": 419,
"end": 446,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 35
}
},
"expression": {
"type": "AssignmentExpression",
"start": 419,
"end": 445,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 34
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 419,
"end": 433,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 22
}
},
"object": {
"type": "ThisExpression",
"start": 419,
"end": 423,
"loc": {
"start": {
"line": 11,
"column": 8
},
"end": {
"line": 11,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 424,
"end": 433,
"loc": {
"start": {
"line": 11,
"column": 13
},
"end": {
"line": 11,
"column": 22
},
"identifierName": "pointType"
},
"name": "pointType"
},
"computed": false
},
"right": {
"type": "Identifier",
"start": 436,
"end": 445,
"loc": {
"start": {
"line": 11,
"column": 25
},
"end": {
"line": 11,
"column": 34
},
"identifierName": "pointType"
},
"name": "pointType"
}
}
},
{
"type": "ExpressionStatement",
"start": 455,
"end": 477,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 30
}
},
"expression": {
"type": "AssignmentExpression",
"start": 455,
"end": 476,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 29
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 455,
"end": 462,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 15
}
},
"object": {
"type": "ThisExpression",
"start": 455,
"end": 459,
"loc": {
"start": {
"line": 12,
"column": 8
},
"end": {
"line": 12,
"column": 12
}
}
},
"property": {
"type": "Identifier",
"start": 460,
"end": 462,
"loc": {
"start": {
"line": 12,
"column": 13
},
"end": {
"line": 12,
"column": 15
},
"identifierName": "id"
},
"name": "id"
},
"computed": false
},
"right": {
"type": "UpdateExpression",
"start": 465,
"end": 476,
"loc": {
"start": {
"line": 12,
"column": 18
},
"end": {
"line": 12,
"column": 29
}
},
"operator": "--",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 467,
"end": 476,
"loc": {
"start": {
"line": 12,
"column": 20
},
"end": {
"line": 12,
"column": 29
},
"identifierName": "idCounter"
},
"name": "idCounter"
},
"extra": {
"parenthesizedArgument": false
}
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 489,
"end": 552,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 17,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 489,
"end": 501,
"loc": {
"start": {
"line": 15,
"column": 4
},
"end": {
"line": 15,
"column": 16
},
"identifierName": "isConstraint"
},
"name": "isConstraint"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 504,
"end": 552,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 17,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 514,
"end": 546,
"loc": {
"start": {
"line": 16,
"column": 8
},
"end": {
"line": 16,
"column": 40
}
},
"argument": {
"type": "MemberExpression",
"start": 521,
"end": 545,
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 16,
"column": 39
}
},
"object": {
"type": "MemberExpression",
"start": 521,
"end": 536,
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 16,
"column": 30
}
},
"object": {
"type": "ThisExpression",
"start": 521,
"end": 525,
"loc": {
"start": {
"line": 16,
"column": 15
},
"end": {
"line": 16,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 526,
"end": 536,
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 30
},
"identifierName": "geomParams"
},
"name": "geomParams"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 537,
"end": 545,
"loc": {
"start": {
"line": 16,
"column": 31
},
"end": {
"line": 16,
"column": 39
},
"identifierName": "entities"
},
"name": "entities"
},
"computed": false
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 558,
"end": 637,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 21,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 558,
"end": 565,
"loc": {
"start": {
"line": 19,
"column": 4
},
"end": {
"line": 19,
"column": 11
},
"identifierName": "isPoint"
},
"name": "isPoint"
},
"static": false,
"kind": "method",
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 568,
"end": 637,
"loc": {
"start": {
"line": 19,
"column": 14
},
"end": {
"line": 21,
"column": 5
}
},
"body": [
{
"type": "ReturnStatement",
"start": 578,
"end": 631,
"loc": {
"start": {
"line": 20,
"column": 8
},
"end": {
"line": 20,
"column": 61
}
},
"argument": {
"type": "LogicalExpression",
"start": 585,
"end": 630,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 60
}
},
"left": {
"type": "MemberExpression",
"start": 585,
"end": 606,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 36
}
},
"object": {
"type": "MemberExpression",
"start": 585,
"end": 600,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 30
}
},
"object": {
"type": "ThisExpression",
"start": 585,
"end": 589,
"loc": {
"start": {
"line": 20,
"column": 15
},
"end": {
"line": 20,
"column": 19
}
}
},
"property": {
"type": "Identifier",
"start": 590,
"end": 600,
"loc": {
"start": {
"line": 20,
"column": 20
},
"end": {
"line": 20,
"column": 30
},
"identifierName": "geomParams"
},
"name": "geomParams"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 601,
"end": 606,
"loc": {
"start": {
"line": 20,
"column": 31
},
"end": {
"line": 20,
"column": 36
},
"identifierName": "start"
},
"name": "start"
},
"computed": false
},
"operator": "&&",
"right": {
"type": "UnaryExpression",
"start": 610,
"end": 630,
"loc": {
"start": {
"line": 20,
"column": 40
},
"end": {
"line": 20,
"column": 60
}
},
"operator": "!",
"prefix": true,
"argument": {
"type": "MemberExpression",
"start": 611,
"end": 630,
"loc": {
"start": {
"line": 20,
"column": 41
},
"end": {
"line": 20,
"column": 60
}
},
"object": {
"type": "MemberExpression",
"start": 611,
"end": 626,
"loc": {
"start": {
"line": 20,
"column": 41
},
"end": {
"line": 20,
"column": 56
}
},
"object": {
"type": "ThisExpression",
"start": 611,
"end": 615,
"loc": {
"start": {
"line": 20,
"column": 41
},
"end": {
"line": 20,
"column": 45
}
}
},
"property": {
"type": "Identifier",
"start": 616,
"end": 626,
"loc": {
"start": {
"line": 20,
"column": 46
},
"end": {
"line": 20,
"column": 56
},
"identifierName": "geomParams"
},
"name": "geomParams"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 627,
"end": 630,
"loc": {
"start": {
"line": 20,
"column": 57
},
"end": {
"line": 20,
"column": 60
},
"identifierName": "end"
},
"name": "end"
},
"computed": false
},
"extra": {
"parenthesizedArgument": false
}
}
}
}
],
"directives": []
}
},
{
"type": "ClassMethod",
"start": 643,
"end": 713,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 25,
"column": 5
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 643,
"end": 655,
"loc": {
"start": {