2025-02-25 23:04:10 -05:00
|
|
|
---
|
2025-03-04 22:53:31 +13:00
|
|
|
source: kcl-lib/src/simulation_tests.rs
|
2025-02-25 23:04:10 -05:00
|
|
|
description: Result of parsing revolve_about_edge.kcl
|
|
|
|
---
|
|
|
|
{
|
|
|
|
"Ok": {
|
|
|
|
"body": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"declaration": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"id": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 0,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "sketch001",
|
|
|
|
"start": 0,
|
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 26,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"raw": "'XY'",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XY"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 12,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "startSketchOn",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 12,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 52,
|
2025-02-25 23:04:10 -05:00
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"argument": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 54,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"raw": "25",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 25.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 53,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"operator": "-",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 58,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"raw": "25",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 25.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 63,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "PipeSubstitution",
|
|
|
|
"type": "PipeSubstitution"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 37,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "startProfileAt",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 37,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 77,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"name": "length",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "Identifier"
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
2025-03-07 22:07:16 -06:00
|
|
|
"arg": {
|
|
|
|
"argument": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 87,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"raw": "50",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 50.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 86,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"operator": "-",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
|
|
|
{
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 91,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"name": "tag",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 97,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-07 22:07:16 -06:00
|
|
|
"type": "TagDeclarator",
|
|
|
|
"type": "TagDeclarator",
|
|
|
|
"value": "rectangleSegmentB001"
|
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 71,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "yLine",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -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-03-07 22:07:16 -06:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
|
|
|
],
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 12,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"kind": "const",
|
|
|
|
"start": 0,
|
|
|
|
"type": "VariableDeclaration",
|
|
|
|
"type": "VariableDeclaration"
|
|
|
|
},
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 120,
|
2025-02-25 23:04:10 -05:00
|
|
|
"declaration": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 120,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"id": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 120,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "sketch002",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"init": {
|
|
|
|
"body": [
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 146,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"raw": "'XY'",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": "XY"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 132,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "startSketchOn",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 132,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "CallExpression",
|
|
|
|
"type": "CallExpression"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 164,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"name": "center",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-04 22:53:31 +13:00
|
|
|
"type": "Identifier"
|
2025-02-28 17:40:01 -08:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 173,
|
2025-02-28 17:40:01 -08:00
|
|
|
"elements": [
|
|
|
|
{
|
|
|
|
"argument": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 175,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"raw": "50",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 50.0,
|
|
|
|
"suffix": "None"
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
2025-02-28 17:40:01 -08:00
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 174,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"operator": "-",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "UnaryExpression",
|
|
|
|
"type": "UnaryExpression"
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
2025-02-28 17:40:01 -08:00
|
|
|
{
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 179,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"raw": "0",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
2025-02-28 17:40:01 -08:00
|
|
|
"value": 0.0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
2025-02-28 17:40:01 -08:00
|
|
|
],
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "ArrayExpression",
|
|
|
|
"type": "ArrayExpression"
|
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
|
|
|
{
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 183,
|
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-28 17:40:01 -08:00
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 192,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"raw": "10",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 10.0,
|
|
|
|
"suffix": "None"
|
|
|
|
}
|
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 157,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "circle",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 157,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-28 17:40:01 -08:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"arguments": [
|
|
|
|
{
|
2025-03-18 20:34:44 -07:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 209,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"name": "angle",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 217,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"raw": "90",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"type": "Literal",
|
|
|
|
"type": "Literal",
|
|
|
|
"value": {
|
|
|
|
"value": 90.0,
|
|
|
|
"suffix": "None"
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
2025-03-18 20:34:44 -07:00
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
},
|
|
|
|
{
|
2025-03-18 20:34:44 -07:00
|
|
|
"type": "LabeledArg",
|
|
|
|
"label": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 221,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"name": "axis",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
|
|
|
"arg": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 228,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"name": "rectangleSegmentB001",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"type": "Identifier",
|
|
|
|
"type": "Identifier"
|
|
|
|
}
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"callee": {
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 201,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"name": "revolve",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "Identifier"
|
|
|
|
},
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 201,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-03-18 20:34:44 -07:00
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"type": "CallExpressionKw",
|
|
|
|
"unlabeled": null
|
2025-02-25 23:04:10 -05:00
|
|
|
}
|
|
|
|
],
|
2025-03-20 16:23:20 +13:00
|
|
|
"commentStart": 132,
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "PipeExpression",
|
|
|
|
"type": "PipeExpression"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"type": "VariableDeclarator"
|
|
|
|
},
|
2025-03-20 11:06:27 +13:00
|
|
|
"end": 0,
|
2025-02-25 23:04:10 -05:00
|
|
|
"kind": "const",
|
2025-03-20 11:06:27 +13:00
|
|
|
"start": 0,
|
2025-02-25 23:04:10 -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-25 23:04:10 -05:00
|
|
|
"start": 0
|
|
|
|
}
|
|
|
|
}
|