589 lines
18 KiB
Plaintext
589 lines
18 KiB
Plaintext
![]() |
---
|
||
|
source: kcl/src/simulation_tests.rs
|
||
|
description: Result of parsing linear_pattern3d_a_pattern.kcl
|
||
|
snapshot_kind: text
|
||
|
---
|
||
|
{
|
||
|
"Ok": {
|
||
|
"body": [
|
||
|
{
|
||
|
"declarations": [
|
||
|
{
|
||
|
"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",
|
||
|
"start": 16,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"end": 35,
|
||
|
"optional": false,
|
||
|
"start": 16,
|
||
|
"type": "CallExpression",
|
||
|
"type": "CallExpression"
|
||
|
},
|
||
|
{
|
||
|
"arguments": [
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"end": 58,
|
||
|
"raw": "0",
|
||
|
"start": 57,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 0
|
||
|
},
|
||
|
{
|
||
|
"end": 61,
|
||
|
"raw": "0",
|
||
|
"start": 60,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 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,
|
||
|
"optional": false,
|
||
|
"start": 41,
|
||
|
"type": "CallExpression",
|
||
|
"type": "CallExpression"
|
||
|
},
|
||
|
{
|
||
|
"arguments": [
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"end": 79,
|
||
|
"raw": "0",
|
||
|
"start": 78,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 0
|
||
|
},
|
||
|
{
|
||
|
"end": 82,
|
||
|
"raw": "2",
|
||
|
"start": 81,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 2
|
||
|
}
|
||
|
],
|
||
|
"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,
|
||
|
"optional": false,
|
||
|
"start": 72,
|
||
|
"type": "CallExpression",
|
||
|
"type": "CallExpression"
|
||
|
},
|
||
|
{
|
||
|
"arguments": [
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"end": 100,
|
||
|
"raw": "3",
|
||
|
"start": 99,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 3
|
||
|
},
|
||
|
{
|
||
|
"end": 103,
|
||
|
"raw": "1",
|
||
|
"start": 102,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 1
|
||
|
}
|
||
|
],
|
||
|
"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,
|
||
|
"optional": false,
|
||
|
"start": 93,
|
||
|
"type": "CallExpression",
|
||
|
"type": "CallExpression"
|
||
|
},
|
||
|
{
|
||
|
"arguments": [
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"end": 121,
|
||
|
"raw": "0",
|
||
|
"start": 120,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 0
|
||
|
},
|
||
|
{
|
||
|
"argument": {
|
||
|
"end": 125,
|
||
|
"raw": "4",
|
||
|
"start": 124,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 4
|
||
|
},
|
||
|
"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,
|
||
|
"optional": false,
|
||
|
"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,
|
||
|
"optional": false,
|
||
|
"start": 136,
|
||
|
"type": "CallExpression",
|
||
|
"type": "CallExpression"
|
||
|
},
|
||
|
{
|
||
|
"arguments": [
|
||
|
{
|
||
|
"end": 159,
|
||
|
"raw": "1",
|
||
|
"start": 158,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 1
|
||
|
},
|
||
|
{
|
||
|
"end": 162,
|
||
|
"start": 161,
|
||
|
"type": "PipeSubstitution",
|
||
|
"type": "PipeSubstitution"
|
||
|
}
|
||
|
],
|
||
|
"callee": {
|
||
|
"end": 157,
|
||
|
"name": "extrude",
|
||
|
"start": 150,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"end": 163,
|
||
|
"optional": false,
|
||
|
"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"
|
||
|
},
|
||
|
{
|
||
|
"declarations": [
|
||
|
{
|
||
|
"end": 258,
|
||
|
"id": {
|
||
|
"end": 171,
|
||
|
"name": "pattn1",
|
||
|
"start": 165,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"init": {
|
||
|
"arguments": [
|
||
|
{
|
||
|
"end": 242,
|
||
|
"properties": [
|
||
|
{
|
||
|
"end": 209,
|
||
|
"key": {
|
||
|
"end": 198,
|
||
|
"name": "axis",
|
||
|
"start": 194,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"start": 194,
|
||
|
"type": "ObjectProperty",
|
||
|
"value": {
|
||
|
"elements": [
|
||
|
{
|
||
|
"end": 202,
|
||
|
"raw": "1",
|
||
|
"start": 201,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 1
|
||
|
},
|
||
|
{
|
||
|
"end": 205,
|
||
|
"raw": "0",
|
||
|
"start": 204,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 0
|
||
|
},
|
||
|
{
|
||
|
"end": 208,
|
||
|
"raw": "0",
|
||
|
"start": 207,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 0
|
||
|
}
|
||
|
],
|
||
|
"end": 209,
|
||
|
"start": 200,
|
||
|
"type": "ArrayExpression",
|
||
|
"type": "ArrayExpression"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"end": 225,
|
||
|
"key": {
|
||
|
"end": 222,
|
||
|
"name": "instances",
|
||
|
"start": 213,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"start": 213,
|
||
|
"type": "ObjectProperty",
|
||
|
"value": {
|
||
|
"end": 225,
|
||
|
"raw": "7",
|
||
|
"start": 224,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 7
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"end": 240,
|
||
|
"key": {
|
||
|
"end": 237,
|
||
|
"name": "distance",
|
||
|
"start": 229,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"start": 229,
|
||
|
"type": "ObjectProperty",
|
||
|
"value": {
|
||
|
"end": 240,
|
||
|
"raw": "6",
|
||
|
"start": 239,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 6
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"start": 190,
|
||
|
"type": "ObjectExpression",
|
||
|
"type": "ObjectExpression"
|
||
|
},
|
||
|
{
|
||
|
"end": 257,
|
||
|
"name": "exampleSketch",
|
||
|
"start": 244,
|
||
|
"type": "Identifier",
|
||
|
"type": "Identifier"
|
||
|
}
|
||
|
],
|
||
|
"callee": {
|
||
|
"end": 189,
|
||
|
"name": "patternLinear3d",
|
||
|
"start": 174,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"end": 258,
|
||
|
"optional": false,
|
||
|
"start": 174,
|
||
|
"type": "CallExpression",
|
||
|
"type": "CallExpression"
|
||
|
},
|
||
|
"start": 165,
|
||
|
"type": "VariableDeclarator"
|
||
|
}
|
||
|
],
|
||
|
"end": 258,
|
||
|
"kind": "const",
|
||
|
"start": 165,
|
||
|
"type": "VariableDeclaration",
|
||
|
"type": "VariableDeclaration"
|
||
|
},
|
||
|
{
|
||
|
"declarations": [
|
||
|
{
|
||
|
"end": 346,
|
||
|
"id": {
|
||
|
"end": 266,
|
||
|
"name": "pattn2",
|
||
|
"start": 260,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"init": {
|
||
|
"arguments": [
|
||
|
{
|
||
|
"end": 337,
|
||
|
"properties": [
|
||
|
{
|
||
|
"end": 304,
|
||
|
"key": {
|
||
|
"end": 293,
|
||
|
"name": "axis",
|
||
|
"start": 289,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"start": 289,
|
||
|
"type": "ObjectProperty",
|
||
|
"value": {
|
||
|
"elements": [
|
||
|
{
|
||
|
"end": 297,
|
||
|
"raw": "0",
|
||
|
"start": 296,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 0
|
||
|
},
|
||
|
{
|
||
|
"end": 300,
|
||
|
"raw": "0",
|
||
|
"start": 299,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 0
|
||
|
},
|
||
|
{
|
||
|
"end": 303,
|
||
|
"raw": "1",
|
||
|
"start": 302,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 1
|
||
|
}
|
||
|
],
|
||
|
"end": 304,
|
||
|
"start": 295,
|
||
|
"type": "ArrayExpression",
|
||
|
"type": "ArrayExpression"
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"end": 319,
|
||
|
"key": {
|
||
|
"end": 316,
|
||
|
"name": "distance",
|
||
|
"start": 308,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"start": 308,
|
||
|
"type": "ObjectProperty",
|
||
|
"value": {
|
||
|
"end": 319,
|
||
|
"raw": "1",
|
||
|
"start": 318,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 1
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"end": 335,
|
||
|
"key": {
|
||
|
"end": 332,
|
||
|
"name": "instances",
|
||
|
"start": 323,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"start": 323,
|
||
|
"type": "ObjectProperty",
|
||
|
"value": {
|
||
|
"end": 335,
|
||
|
"raw": "7",
|
||
|
"start": 334,
|
||
|
"type": "Literal",
|
||
|
"type": "Literal",
|
||
|
"value": 7
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"start": 285,
|
||
|
"type": "ObjectExpression",
|
||
|
"type": "ObjectExpression"
|
||
|
},
|
||
|
{
|
||
|
"end": 345,
|
||
|
"name": "pattn1",
|
||
|
"start": 339,
|
||
|
"type": "Identifier",
|
||
|
"type": "Identifier"
|
||
|
}
|
||
|
],
|
||
|
"callee": {
|
||
|
"end": 284,
|
||
|
"name": "patternLinear3d",
|
||
|
"start": 269,
|
||
|
"type": "Identifier"
|
||
|
},
|
||
|
"end": 346,
|
||
|
"optional": false,
|
||
|
"start": 269,
|
||
|
"type": "CallExpression",
|
||
|
"type": "CallExpression"
|
||
|
},
|
||
|
"start": 260,
|
||
|
"type": "VariableDeclarator"
|
||
|
}
|
||
|
],
|
||
|
"end": 346,
|
||
|
"kind": "const",
|
||
|
"start": 260,
|
||
|
"type": "VariableDeclaration",
|
||
|
"type": "VariableDeclaration"
|
||
|
}
|
||
|
],
|
||
|
"end": 347,
|
||
|
"nonCodeMeta": {
|
||
|
"nonCodeNodes": {
|
||
|
"0": [
|
||
|
{
|
||
|
"end": 165,
|
||
|
"start": 163,
|
||
|
"type": "NonCodeNode",
|
||
|
"value": {
|
||
|
"type": "newLine"
|
||
|
}
|
||
|
}
|
||
|
],
|
||
|
"1": [
|
||
|
{
|
||
|
"end": 260,
|
||
|
"start": 258,
|
||
|
"type": "NonCodeNode",
|
||
|
"value": {
|
||
|
"type": "newLine"
|
||
|
}
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"startNodes": []
|
||
|
},
|
||
|
"start": 0
|
||
|
}
|
||
|
}
|