2025-02-10 14:24:00 -05:00
|
|
|
---
|
|
|
|
source: kcl/src/simulation_tests.rs
|
|
|
|
description: Result of parsing helix_simple.kcl
|
2025-02-11 16:06:47 -06:00
|
|
|
snapshot_kind: text
|
2025-02-10 14:24:00 -05:00
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"declaration": {
|
|
|
|
"end": 137,
|
|
|
|
"id": {
|
|
|
|
"end": 43,
|
|
|
|
"name": "helper001",
|
|
|
|
"start": 34,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"end": 64,
|
|
|
|
"raw": "'XZ'",
|
|
|
|
"start": 60,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XZ"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 59,
|
|
|
|
"name": "startSketchOn",
|
|
|
|
"start": 46,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 65,
|
|
|
|
"start": 46,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 88,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 87,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 91,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 90,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 92,
|
|
|
|
"start": 86,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 95,
|
|
|
|
"start": 94,
|
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 85,
|
|
|
|
"name": "startProfileAt",
|
|
|
|
"start": 71,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 96,
|
|
|
|
"start": 71,
|
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "end"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"end": 115,
|
|
|
|
"raw": "0",
|
|
|
|
"start": 114,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"end": 119,
|
|
|
|
"raw": "10",
|
|
|
|
"start": 117,
|
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 10.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 120,
|
|
|
|
"start": 113,
|
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "tag"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"end": 136,
|
|
|
|
"start": 128,
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"value": "edge001"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 106,
|
|
|
|
"name": "line",
|
|
|
|
"start": 102,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"end": 137,
|
|
|
|
"start": 102,
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"end": 137,
|
|
|
|
"start": 46,
|
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
|
|
|
"start": 34,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
|
|
|
"end": 137,
|
|
|
|
"kind": "const",
|
|
|
|
"start": 34,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"declaration": {
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 257,
|
2025-02-10 14:24:00 -05:00
|
|
|
"id": {
|
|
|
|
"end": 148,
|
|
|
|
"name": "helixPath",
|
|
|
|
"start": 139,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "angleStart"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 174,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "0",
|
2025-02-11 16:06:47 -06:00
|
|
|
"start": 173,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "ccw"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 188,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "true",
|
2025-02-11 16:06:47 -06:00
|
|
|
"start": 184,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "revolutions"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 207,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "5",
|
2025-02-11 16:06:47 -06:00
|
|
|
"start": 206,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 5.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "length"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 222,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "10",
|
2025-02-11 16:06:47 -06:00
|
|
|
"start": 220,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 10.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "radius"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 236,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "5",
|
2025-02-11 16:06:47 -06:00
|
|
|
"start": 235,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 5.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
|
|
|
"type": "Identifier",
|
|
|
|
"name": "axis"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 254,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "edge001",
|
2025-02-11 16:06:47 -06:00
|
|
|
"start": 247,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
|
|
|
"end": 156,
|
|
|
|
"name": "helix",
|
|
|
|
"start": 151,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 257,
|
2025-02-10 14:24:00 -05:00
|
|
|
"start": 151,
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
|
|
|
},
|
|
|
|
"start": 139,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 257,
|
2025-02-10 14:24:00 -05:00
|
|
|
"kind": "const",
|
|
|
|
"start": 139,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
}
|
|
|
|
],
|
2025-02-11 16:06:47 -06:00
|
|
|
"end": 258,
|
2025-02-10 14:24:00 -05:00
|
|
|
"nonCodeMeta": {
|
|
|
|
"nonCodeNodes": {
|
|
|
|
"0": [
|
|
|
|
{
|
|
|
|
"end": 139,
|
|
|
|
"start": 137,
|
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "newLine"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"startNodes": [
|
|
|
|
{
|
|
|
|
"end": 33,
|
|
|
|
"start": 0,
|
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "blockComment",
|
|
|
|
"value": "Create a helix around an edge.",
|
|
|
|
"style": "line"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|