awv3
Version:
⚡ AWV3 embedded CAD
1,405 lines • 32.3 kB
JSON
{
"type": "File",
"start": 0,
"end": 137,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 137,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 6,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 31
}
},
"specifiers": [
{
"type": "ImportNamespaceSpecifier",
"start": 7,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 16
}
},
"local": {
"type": "Identifier",
"start": 12,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 16
},
"identifierName": "Type"
},
"name": "Type"
}
}
],
"source": {
"type": "StringLiteral",
"start": 22,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 30
}
},
"extra": {
"rawValue": "./type",
"raw": "'./type'"
},
"value": "./type"
}
},
{
"type": "ExportDefaultDeclaration",
"start": 33,
"end": 136,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 5,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 48,
"end": 136,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 5,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 57,
"end": 67,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 34
},
"identifierName": "Constraint"
},
"name": "Constraint"
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 68,
"end": 72,
"loc": {
"start": {
"line": 3,
"column": 35
},
"end": {
"line": 3,
"column": 39
},
"identifierName": "type"
},
"name": "type"
}
],
"body": {
"type": "BlockStatement",
"start": 74,
"end": 136,
"loc": {
"start": {
"line": 3,
"column": 41
},
"end": {
"line": 5,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 80,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 58
}
},
"argument": {
"type": "CallExpression",
"start": 87,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 57
}
},
"callee": {
"type": "MemberExpression",
"start": 87,
"end": 111,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 35
}
},
"object": {
"type": "CallExpression",
"start": 87,
"end": 106,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 30
}
},
"callee": {
"type": "MemberExpression",
"start": 87,
"end": 100,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 24
}
},
"object": {
"type": "Identifier",
"start": 87,
"end": 93,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 17
},
"identifierName": "Object"
},
"name": "Object"
},
"property": {
"type": "Identifier",
"start": 94,
"end": 100,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 24
},
"identifierName": "values"
},
"name": "values"
},
"computed": false
},
"arguments": [
{
"type": "Identifier",
"start": 101,
"end": 105,
"loc": {
"start": {
"line": 4,
"column": 25
},
"end": {
"line": 4,
"column": 29
},
"identifierName": "Type"
},
"name": "Type"
}
]
},
"property": {
"type": "Identifier",
"start": 107,
"end": 111,
"loc": {
"start": {
"line": 4,
"column": 31
},
"end": {
"line": 4,
"column": 35
},
"identifierName": "find"
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "ArrowFunctionExpression",
"start": 112,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 4,
"column": 56
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 112,
"end": 113,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 4,
"column": 37
},
"identifierName": "c"
},
"name": "c"
}
],
"body": {
"type": "BinaryExpression",
"start": 117,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 56
}
},
"left": {
"type": "MemberExpression",
"start": 117,
"end": 123,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 47
}
},
"object": {
"type": "Identifier",
"start": 117,
"end": 118,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 42
},
"identifierName": "c"
},
"name": "c"
},
"property": {
"type": "Identifier",
"start": 119,
"end": 123,
"loc": {
"start": {
"line": 4,
"column": 43
},
"end": {
"line": 4,
"column": 47
},
"identifierName": "type"
},
"name": "type"
},
"computed": false
},
"operator": "===",
"right": {
"type": "Identifier",
"start": 128,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 52
},
"end": {
"line": 4,
"column": 56
},
"identifierName": "type"
},
"name": "type"
}
}
}
]
}
}
],
"directives": []
},
"leadingComments": [],
"trailingComments": []
}
}
],
"directives": []
},
"comments": [],
"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": "*",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 10,
"updateContext": null
},
"value": "*",
"start": 7,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "as",
"start": 9,
"end": 11,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 11
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Type",
"start": 12,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 16
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "from",
"start": 17,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 17
},
"end": {
"line": 1,
"column": 21
}
}
},
{
"type": {
"label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "./type",
"start": 22,
"end": 30,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 30
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 30,
"end": 31,
"loc": {
"start": {
"line": 1,
"column": 30
},
"end": {
"line": 1,
"column": 31
}
}
},
{
"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": 33,
"end": 39,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"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": 40,
"end": 47,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 14
}
}
},
{
"type": {
"label": "function",
"keyword": "function",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "function",
"start": 48,
"end": 56,
"loc": {
"start": {
"line": 3,
"column": 15
},
"end": {
"line": 3,
"column": 23
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Constraint",
"start": 57,
"end": 67,
"loc": {
"start": {
"line": 3,
"column": 24
},
"end": {
"line": 3,
"column": 34
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 67,
"end": 68,
"loc": {
"start": {
"line": 3,
"column": 34
},
"end": {
"line": 3,
"column": 35
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 68,
"end": 72,
"loc": {
"start": {
"line": 3,
"column": 35
},
"end": {
"line": 3,
"column": 39
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 72,
"end": 73,
"loc": {
"start": {
"line": 3,
"column": 39
},
"end": {
"line": 3,
"column": 40
}
}
},
{
"type": {
"label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 74,
"end": 75,
"loc": {
"start": {
"line": 3,
"column": 41
},
"end": {
"line": 3,
"column": 42
}
}
},
{
"type": {
"label": "return",
"keyword": "return",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": "return",
"start": 80,
"end": 86,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 10
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Object",
"start": 87,
"end": 93,
"loc": {
"start": {
"line": 4,
"column": 11
},
"end": {
"line": 4,
"column": 17
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 93,
"end": 94,
"loc": {
"start": {
"line": 4,
"column": 17
},
"end": {
"line": 4,
"column": 18
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "values",
"start": 94,
"end": 100,
"loc": {
"start": {
"line": 4,
"column": 18
},
"end": {
"line": 4,
"column": 24
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 100,
"end": 101,
"loc": {
"start": {
"line": 4,
"column": 24
},
"end": {
"line": 4,
"column": 25
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "Type",
"start": 101,
"end": 105,
"loc": {
"start": {
"line": 4,
"column": 25
},
"end": {
"line": 4,
"column": 29
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 105,
"end": 106,
"loc": {
"start": {
"line": 4,
"column": 29
},
"end": {
"line": 4,
"column": 30
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 106,
"end": 107,
"loc": {
"start": {
"line": 4,
"column": 30
},
"end": {
"line": 4,
"column": 31
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "find",
"start": 107,
"end": 111,
"loc": {
"start": {
"line": 4,
"column": 31
},
"end": {
"line": 4,
"column": 35
}
}
},
{
"type": {
"label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 111,
"end": 112,
"loc": {
"start": {
"line": 4,
"column": 35
},
"end": {
"line": 4,
"column": 36
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "c",
"start": 112,
"end": 113,
"loc": {
"start": {
"line": 4,
"column": 36
},
"end": {
"line": 4,
"column": 37
}
}
},
{
"type": {
"label": "=>",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 114,
"end": 116,
"loc": {
"start": {
"line": 4,
"column": 38
},
"end": {
"line": 4,
"column": 40
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "c",
"start": 117,
"end": 118,
"loc": {
"start": {
"line": 4,
"column": 41
},
"end": {
"line": 4,
"column": 42
}
}
},
{
"type": {
"label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 118,
"end": 119,
"loc": {
"start": {
"line": 4,
"column": 42
},
"end": {
"line": 4,
"column": 43
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 119,
"end": 123,
"loc": {
"start": {
"line": 4,
"column": 43
},
"end": {
"line": 4,
"column": 47
}
}
},
{
"type": {
"label": "==/!=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": 6,
"updateContext": null
},
"value": "===",
"start": 124,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 48
},
"end": {
"line": 4,
"column": 51
}
}
},
{
"type": {
"label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"value": "type",
"start": 128,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 52
},
"end": {
"line": 4,
"column": 56
}
}
},
{
"type": {
"label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 132,
"end": 133,
"loc": {
"start": {
"line": 4,
"column": 56
},
"end": {
"line": 4,
"column": 57
}
}
},
{
"type": {
"label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 133,
"end": 134,
"loc": {
"start": {
"line": 4,
"column": 57
},
"end": {
"line": 4,
"column": 58
}
}
},
{
"type": {
"label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
"start": 135,
"end": 136,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 1
}
}
},
{
"type": {
"label": "eof",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"start": 137,
"end": 137,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 0
}
}
}
]
}