2025-02-10 14:24:00 -05:00
|
|
|
---
|
2025-03-04 22:53:31 +13:00
|
|
|
source: kcl-lib/src/simulation_tests.rs
|
2025-02-10 14:24:00 -05:00
|
|
|
description: Result of parsing helix_simple.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"declaration": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 34,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"id": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 34,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "helper001",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 60,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "'XZ'",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XZ"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 46,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "startSketchOn",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 46,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 86,
|
2025-02-10 14:24:00 -05:00
|
|
|
"elements": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 87,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "0",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 90,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "0",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 94,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 71,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "startProfileAt",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 71,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 107,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "end",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 113,
|
2025-02-10 14:24:00 -05:00
|
|
|
"elements": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 114,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "0",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 117,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "10",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 10.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 122,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "tag",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 128,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "TagDeclarator",
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"value": "edge001"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 102,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "line",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 102,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 46,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"kind": "const",
|
2025-03-20 16:23:20 +13:00
|
|
|
"preComments": [
|
|
|
|
"// Create a helix around an edge."
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 137,
|
2025-02-10 14:24:00 -05:00
|
|
|
"declaration": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 139,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"id": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 139,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "helixPath",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 160,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "angleStart",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 173,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "0",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 0.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 178,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "ccw",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 184,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "true",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 192,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "revolutions",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 206,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "5",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 5.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 211,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "length",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 220,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "10",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 10.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 226,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "radius",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 235,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"raw": "5",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 5.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 240,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "axis",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 247,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "edge001",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 151,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"name": "helix",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 151,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"kind": "const",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"nonCodeMeta": {
|
|
|
|
"nonCodeNodes": {
|
|
|
|
"0": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 137,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-10 14:24:00 -05:00
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "newLine"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"startNodes": []
|
2025-02-10 14:24:00 -05:00
|
|
|
},
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|