2025-03-11 18:23:21 -07:00
|
|
|
---
|
|
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
|
|
description: Result of parsing import_transform.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"path": {
|
|
|
|
"type": "Foreign",
|
|
|
|
"path": "2-5-long-m8-chc-screw.stl"
|
|
|
|
},
|
|
|
|
"selector": {
|
|
|
|
"type": "None",
|
|
|
|
"alias": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "screw",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "ImportStatement",
|
|
|
|
"type": "ImportStatement"
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"expression": {
|
|
|
|
"body": [
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "screw",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "roll",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "pitch",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "yaw",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "rotate",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "translate",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"elements": [
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "translate",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "scale",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
|
|
|
"elements": [
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"raw": "3.14",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 3.14,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"name": "scale",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": {
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "ExpressionStatement",
|
|
|
|
"type": "ExpressionStatement"
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"nonCodeMeta": {
|
|
|
|
"nonCodeNodes": {
|
|
|
|
"0": [
|
|
|
|
{
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-11 18:23:21 -07:00
|
|
|
"type": "NonCodeNode",
|
|
|
|
"value": {
|
|
|
|
"type": "newLine"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"startNodes": []
|
|
|
|
},
|
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|