Files
modeling-app/src/wasm-lib/kcl/tests/linear_pattern3d_a_pattern/ast.snap

573 lines
17 KiB
Plaintext
Raw Normal View History

---
source: kcl/src/simulation_tests.rs
description: Result of parsing linear_pattern3d_a_pattern.kcl
---
{
"Ok": {
"body": [
{
"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",
"start": 16,
"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"
},
"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": {
"elements": [
{
"end": 203,
"raw": "1",
"start": 202,
"type": "Literal",
"type": "Literal",
"value": 1.0
},
{
"end": 206,
"raw": "0",
"start": 205,
"type": "Literal",
"type": "Literal",
"value": 0.0
},
{
"end": 209,
"raw": "0",
"start": 208,
"type": "Literal",
"type": "Literal",
"value": 0.0
}
],
"end": 210,
"start": 201,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"end": 227,
"key": {
"end": 223,
"name": "instances",
"start": 214,
"type": "Identifier"
},
"start": 214,
"type": "ObjectProperty",
"value": {
"end": 227,
"raw": "7",
"start": 226,
"type": "Literal",
"type": "Literal",
"value": 7.0
}
},
{
"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": {
"elements": [
{
"end": 301,
"raw": "0",
"start": 300,
"type": "Literal",
"type": "Literal",
"value": 0.0
},
{
"end": 304,
"raw": "0",
"start": 303,
"type": "Literal",
"type": "Literal",
"value": 0.0
},
{
"end": 307,
"raw": "1",
"start": 306,
"type": "Literal",
"type": "Literal",
"value": 1.0
}
],
"end": 308,
"start": 299,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
},
{
"end": 324,
"key": {
"end": 320,
"name": "distance",
"start": 312,
"type": "Identifier"
},
"start": 312,
"type": "ObjectProperty",
"value": {
"end": 324,
"raw": "1",
"start": 323,
"type": "Literal",
"type": "Literal",
"value": 1.0
}
},
{
"end": 341,
"key": {
"end": 337,
"name": "instances",
"start": 328,
"type": "Identifier"
},
"start": 328,
"type": "ObjectProperty",
"value": {
"end": 341,
"raw": "7",
"start": 340,
"type": "Literal",
"type": "Literal",
"value": 7.0
}
}
],
"start": 288,
"type": "ObjectExpression",
"type": "ObjectExpression"
},
{
"end": 351,
"name": "pattn1",
"start": 345,
"type": "Identifier",
"type": "Identifier"
}
],
"callee": {
"end": 287,
"name": "patternLinear3d",
"start": 272,
"type": "Identifier"
},
"end": 352,
"start": 272,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 263,
"type": "VariableDeclarator"
},
"end": 352,
"kind": "const",
"start": 263,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 353,
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"end": 165,
"start": 163,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
],
"1": [
{
"end": 263,
"start": 261,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": []
},
"start": 0
}
}