2024-11-18 16:20:32 -06:00
|
|
|
---
|
|
|
|
source: kcl/src/simulation_tests.rs
|
|
|
|
description: Result of parsing linear_pattern3d_a_pattern.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"declaration": {
|
|
|
|
"end": 163,
|
|
|
|
"id": {
|
|
|
|
"end": 13,
|
|
|
|
"name": "exampleSketch",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 34,
|
|
|
|
"raw": "'XZ'",
|
|
|
|
"start": 30,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XZ"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 29,
|
|
|
|
"name": "startSketchOn",
|
2024-11-18 16:20:32 -06:00
|
|
|
"start": 16,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 35,
|
|
|
|
"start": 16,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 58,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 57,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 0.0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 61,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 60,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 0.0
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 62,
|
|
|
|
"start": 56,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 65,
|
|
|
|
"start": 64,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 55,
|
|
|
|
"name": "startProfileAt",
|
|
|
|
"start": 41,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 66,
|
|
|
|
"start": 41,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 79,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 78,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 0.0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 82,
|
|
|
|
"raw": "2",
|
|
|
|
"start": 81,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 2.0
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 83,
|
|
|
|
"start": 77,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 86,
|
|
|
|
"start": 85,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 76,
|
|
|
|
"name": "line",
|
|
|
|
"start": 72,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 87,
|
|
|
|
"start": 72,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 100,
|
|
|
|
"raw": "3",
|
|
|
|
"start": 99,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 3.0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 103,
|
|
|
|
"raw": "1",
|
|
|
|
"start": 102,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 1.0
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 104,
|
|
|
|
"start": 98,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 107,
|
|
|
|
"start": 106,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 97,
|
|
|
|
"name": "line",
|
|
|
|
"start": 93,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 108,
|
|
|
|
"start": 93,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 121,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 120,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 0.0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"argument": {
|
|
|
|
"end": 125,
|
|
|
|
"raw": "4",
|
|
|
|
"start": 124,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 4.0
|
|
|
|
},
|
|
|
|
"end": 125,
|
|
|
|
"operator": "-",
|
|
|
|
"start": 123,
|
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 126,
|
|
|
|
"start": 119,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 129,
|
|
|
|
"start": 128,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 118,
|
|
|
|
"name": "line",
|
|
|
|
"start": 114,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 130,
|
|
|
|
"start": 114,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 143,
|
|
|
|
"start": 142,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 141,
|
|
|
|
"name": "close",
|
|
|
|
"start": 136,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 144,
|
|
|
|
"start": 136,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 159,
|
|
|
|
"raw": "1",
|
|
|
|
"start": 158,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 1.0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 162,
|
|
|
|
"start": 161,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 157,
|
|
|
|
"name": "extrude",
|
|
|
|
"start": 150,
|
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 163,
|
|
|
|
"start": 150,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 163,
|
|
|
|
"start": 16,
|
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
|
|
|
"end": 163,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"declaration": {
|
|
|
|
"end": 261,
|
|
|
|
"id": {
|
|
|
|
"end": 171,
|
|
|
|
"name": "pattn1",
|
|
|
|
"start": 165,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 245,
|
|
|
|
"properties": [
|
|
|
|
{
|
|
|
|
"end": 210,
|
|
|
|
"key": {
|
|
|
|
"end": 198,
|
|
|
|
"name": "axis",
|
|
|
|
"start": 194,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"start": 194,
|
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
2024-11-18 16:20:32 -06:00
|
|
|
"elements": [
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 203,
|
|
|
|
"raw": "1",
|
|
|
|
"start": 202,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 1.0
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 206,
|
2024-11-18 16:20:32 -06:00
|
|
|
"raw": "0",
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 205,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 209,
|
2024-11-18 16:20:32 -06:00
|
|
|
"raw": "0",
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 208,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 210,
|
|
|
|
"start": 201,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
2024-12-07 07:16:04 +13:00
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 227,
|
|
|
|
"key": {
|
|
|
|
"end": 223,
|
|
|
|
"name": "instances",
|
|
|
|
"start": 214,
|
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 214,
|
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
|
|
|
"end": 227,
|
|
|
|
"raw": "7",
|
|
|
|
"start": 226,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 7.0
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
{
|
|
|
|
"end": 243,
|
|
|
|
"key": {
|
|
|
|
"end": 239,
|
|
|
|
"name": "distance",
|
|
|
|
"start": 231,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"start": 231,
|
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
|
|
|
"end": 243,
|
|
|
|
"raw": "6",
|
|
|
|
"start": 242,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 6.0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"start": 190,
|
|
|
|
"type": "ObjectExpression",
|
|
|
|
"type": "ObjectExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 260,
|
|
|
|
"name": "exampleSketch",
|
|
|
|
"start": 247,
|
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 189,
|
|
|
|
"name": "patternLinear3d",
|
|
|
|
"start": 174,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 261,
|
|
|
|
"start": 174,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
"start": 165,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
|
|
|
"end": 261,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 165,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"declaration": {
|
|
|
|
"end": 352,
|
|
|
|
"id": {
|
|
|
|
"end": 269,
|
|
|
|
"name": "pattn2",
|
|
|
|
"start": 263,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 343,
|
|
|
|
"properties": [
|
|
|
|
{
|
|
|
|
"end": 308,
|
|
|
|
"key": {
|
|
|
|
"end": 296,
|
|
|
|
"name": "axis",
|
|
|
|
"start": 292,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"start": 292,
|
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
2024-11-18 16:20:32 -06:00
|
|
|
"elements": [
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 301,
|
2024-11-18 16:20:32 -06:00
|
|
|
"raw": "0",
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 300,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 0.0
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 304,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 303,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-12-07 07:16:04 +13:00
|
|
|
"value": 0.0
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
|
|
|
{
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 307,
|
2024-11-18 16:20:32 -06:00
|
|
|
"raw": "1",
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 306,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 1.0
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
],
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 308,
|
|
|
|
"start": 299,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
{
|
|
|
|
"end": 324,
|
|
|
|
"key": {
|
|
|
|
"end": 320,
|
|
|
|
"name": "distance",
|
|
|
|
"start": 312,
|
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 312,
|
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
|
|
|
"end": 324,
|
2024-11-18 16:20:32 -06:00
|
|
|
"raw": "1",
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 323,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
2024-11-25 10:50:43 +13:00
|
|
|
"value": 1.0
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
{
|
|
|
|
"end": 341,
|
|
|
|
"key": {
|
|
|
|
"end": 337,
|
|
|
|
"name": "instances",
|
|
|
|
"start": 328,
|
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"start": 328,
|
|
|
|
"type": "ObjectProperty",
|
|
|
|
"value": {
|
2024-11-25 09:21:55 +13:00
|
|
|
"end": 341,
|
2024-12-07 07:16:04 +13:00
|
|
|
"raw": "7",
|
|
|
|
"start": 340,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": 7.0
|
2024-11-18 16:20:32 -06:00
|
|
|
}
|
2024-12-07 07:16:04 +13:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"start": 288,
|
|
|
|
"type": "ObjectExpression",
|
|
|
|
"type": "ObjectExpression"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
{
|
|
|
|
"end": 351,
|
|
|
|
"name": "pattn1",
|
|
|
|
"start": 345,
|
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 287,
|
|
|
|
"name": "patternLinear3d",
|
2024-11-25 09:21:55 +13:00
|
|
|
"start": 272,
|
2024-12-07 07:16:04 +13:00
|
|
|
"type": "Identifier"
|
2024-11-18 16:20:32 -06:00
|
|
|
},
|
2024-12-07 07:16:04 +13:00
|
|
|
"end": 352,
|
|
|
|
"start": 272,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
"start": 263,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2024-11-25 09:21:55 +13:00
|
|
|
"end": 352,
|
2024-11-18 16:20:32 -06:00
|
|
|
"kind": "const",
|
2024-11-25 09:21:55 +13:00
|
|
|
"start": 263,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
}
|
|
|
|
],
|
2024-11-25 09:21:55 +13:00
|
|
|
"end": 353,
|
2024-11-18 16:20:32 -06:00
|
|
|
"nonCodeMeta": {
|
|
|
|
"nonCodeNodes": {
|
|
|
|
"0": [
|
|
|
|
{
|
|
|
|
"end": 165,
|
|
|
|
"start": 163,
|
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "newLine"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"1": [
|
|
|
|
{
|
2024-11-25 09:21:55 +13:00
|
|
|
"end": 263,
|
|
|
|
"start": 261,
|
2024-11-18 16:20:32 -06:00
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "newLine"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"startNodes": []
|
|
|
|
},
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|