Files
modeling-app/rust/kcl-lib/tests/kcl_samples/walkie-talkie/ast.snap
Jess Frazelle 358b34de4c Fix translate scale & better docs (#6053)
* change translate & scale to be better & docs

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* autocomplete

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* gen std

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* kcl-samples

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2025-03-28 21:14:29 +00:00

2354 lines
72 KiB
Plaintext

---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing walkie-talkie.kcl
---
{
"Ok": {
"body": [
{
"commentStart": 383,
"end": 0,
"path": {
"type": "Kcl",
"filename": "globals.kcl"
},
"preComments": [
"// import constants"
],
"selector": {
"commentStart": 412,
"end": 0,
"start": 0,
"type": "Glob"
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 432,
"end": 0,
"path": {
"type": "Kcl",
"filename": "body.kcl"
},
"preComments": [
"",
"",
"// import parts and constants"
],
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 471,
"end": 0,
"name": {
"commentStart": 471,
"end": 0,
"name": "body",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 492,
"end": 0,
"path": {
"type": "Kcl",
"filename": "case.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 499,
"end": 0,
"name": {
"commentStart": 499,
"end": 0,
"name": "case",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 520,
"end": 0,
"path": {
"type": "Kcl",
"filename": "antenna.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 527,
"end": 0,
"name": {
"commentStart": 527,
"end": 0,
"name": "antenna",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 554,
"end": 0,
"path": {
"type": "Kcl",
"filename": "talk-button.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 561,
"end": 0,
"name": {
"commentStart": 561,
"end": 0,
"name": "talkButton",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 595,
"end": 0,
"path": {
"type": "Kcl",
"filename": "knob.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 602,
"end": 0,
"name": {
"commentStart": 602,
"end": 0,
"name": "knob",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 623,
"end": 0,
"path": {
"type": "Kcl",
"filename": "button.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 630,
"end": 0,
"name": {
"commentStart": 630,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 654,
"end": 0,
"expression": {
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 675,
"end": 0,
"name": {
"commentStart": 675,
"end": 0,
"name": "body",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 675,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
"preComments": [
"",
"",
"// import the body"
],
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 681,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 705,
"end": 0,
"name": {
"commentStart": 705,
"end": 0,
"name": "antenna",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 705,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 730,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 734,
"end": 0,
"left": {
"commentStart": 734,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 735,
"end": 0,
"name": {
"commentStart": 735,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 734,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 743,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"commentStart": 747,
"end": 0,
"raw": ".45",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.45,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 752,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 757,
"end": 0,
"raw": "0.10",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.1,
"suffix": "None"
}
},
"commentStart": 756,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 763,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 767,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 767,
"end": 0,
"name": {
"commentStart": 767,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 776,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 720,
"end": 0,
"name": {
"commentStart": 720,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 720,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 705,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 778,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "import the case",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"preComments": [
"",
"",
"// import the antenna"
],
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 799,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 799,
"end": 0,
"name": {
"commentStart": 799,
"end": 0,
"name": "case",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 799,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 821,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 825,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 828,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 833,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 832,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 836,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 840,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 811,
"end": 0,
"name": {
"commentStart": 811,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 811,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 799,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 842,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "import the talk button",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 870,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 870,
"end": 0,
"name": {
"commentStart": 870,
"end": 0,
"name": "talkButton",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 870,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 898,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 902,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 902,
"end": 0,
"name": {
"commentStart": 902,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 910,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 913,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 917,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 918,
"end": 0,
"name": {
"commentStart": 918,
"end": 0,
"name": "thickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 917,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 930,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 933,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 937,
"end": 0,
"raw": ".5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.5,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 888,
"end": 0,
"name": {
"commentStart": 888,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 888,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 870,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 940,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "import the frequency knob",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 971,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 971,
"end": 0,
"name": {
"commentStart": 971,
"end": 0,
"name": "knob",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 971,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 998,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1002,
"end": 0,
"left": {
"commentStart": 1002,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1002,
"end": 0,
"name": {
"commentStart": 1002,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1010,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 1014,
"end": 0,
"raw": "0.70",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.7,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1024,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1028,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 1029,
"end": 0,
"name": {
"commentStart": 1029,
"end": 0,
"name": "thickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1028,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1041,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1048,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1052,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1052,
"end": 0,
"name": {
"commentStart": 1052,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1061,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 983,
"end": 0,
"name": {
"commentStart": 983,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 983,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 971,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 1068,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLineBlockComment",
"value": "import the buttons",
"style": "line"
}
}
]
},
"startNodes": []
},
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 1092,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1092,
"end": 0,
"name": {
"commentStart": 1092,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1092,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1121,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1127,
"end": 0,
"left": {
"commentStart": 1127,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1127,
"end": 0,
"name": {
"commentStart": 1127,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1141,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"abs_path": false,
"commentStart": 1145,
"end": 0,
"name": {
"commentStart": 1145,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1125,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1161,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1166,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1165,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1173,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1177,
"end": 0,
"name": {
"commentStart": 1177,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1106,
"end": 0,
"name": {
"commentStart": 1106,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1106,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1092,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 1199,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1199,
"end": 0,
"name": {
"commentStart": 1199,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1199,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1231,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1237,
"end": 0,
"left": {
"commentStart": 1237,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1237,
"end": 0,
"name": {
"commentStart": 1237,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1251,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"abs_path": false,
"commentStart": 1255,
"end": 0,
"name": {
"commentStart": 1255,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1235,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1274,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1279,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1278,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1289,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1293,
"end": 0,
"left": {
"commentStart": 1293,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1293,
"end": 0,
"name": {
"commentStart": 1293,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 1311,
"end": 0,
"name": {
"commentStart": 1311,
"end": 0,
"name": "buttonHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 1327,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1327,
"end": 0,
"name": {
"commentStart": 1327,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1339,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1213,
"end": 0,
"name": {
"commentStart": 1213,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1213,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1199,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 1349,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1349,
"end": 0,
"name": {
"commentStart": 1349,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1349,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1388,
"end": 0,
"name": "roll",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1395,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1405,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1413,
"end": 0,
"raw": "180",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 180.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1425,
"end": 0,
"name": "yaw",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1431,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1363,
"end": 0,
"name": {
"commentStart": 1363,
"end": 0,
"name": "rotate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1363,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"commentStart": 1378,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1465,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1469,
"end": 0,
"left": {
"commentStart": 1469,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1469,
"end": 0,
"name": {
"commentStart": 1469,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1483,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"abs_path": false,
"commentStart": 1487,
"end": 0,
"name": {
"commentStart": 1487,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1506,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1511,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1510,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1522,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1526,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1526,
"end": 0,
"name": {
"commentStart": 1526,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 1544,
"end": 0,
"name": {
"commentStart": 1544,
"end": 0,
"name": "buttonHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1566,
"end": 0,
"name": "global",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1575,
"end": 0,
"raw": "true",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": true
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1446,
"end": 0,
"name": {
"commentStart": 1446,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1446,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1349,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 1588,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1588,
"end": 0,
"name": {
"commentStart": 1588,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1588,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1627,
"end": 0,
"name": "roll",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1634,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1644,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1652,
"end": 0,
"raw": "180",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 180.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1664,
"end": 0,
"name": "yaw",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1670,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1602,
"end": 0,
"name": {
"commentStart": 1602,
"end": 0,
"name": "rotate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1602,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"commentStart": 1617,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1704,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1708,
"end": 0,
"left": {
"commentStart": 1708,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1708,
"end": 0,
"name": {
"commentStart": 1708,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1722,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "+",
"right": {
"abs_path": false,
"commentStart": 1726,
"end": 0,
"name": {
"commentStart": 1726,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1745,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1750,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1749,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1761,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1765,
"end": 0,
"left": {
"commentStart": 1765,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1765,
"end": 0,
"name": {
"commentStart": 1765,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 1784,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1784,
"end": 0,
"name": {
"commentStart": 1784,
"end": 0,
"name": "buttonHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1799,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 1805,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1805,
"end": 0,
"name": {
"commentStart": 1805,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1817,
"end": 0,
"raw": "2",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 2.0,
"suffix": "None"
}
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1828,
"end": 0,
"name": "global",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1837,
"end": 0,
"raw": "true",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": true
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1685,
"end": 0,
"name": {
"commentStart": 1685,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1685,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1588,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
}
],
"commentStart": 0,
"end": 0,
"innerAttrs": [
{
"commentStart": 0,
"end": 0,
"name": {
"commentStart": 351,
"end": 0,
"name": "settings",
"start": 0,
"type": "Identifier"
},
"preComments": [
"// Walkie Talkie",
"// A portable, handheld two-way radio device that allows users to communicate wirelessly over short to medium distances. It operates on specific radio frequencies and features a push-to-talk button for transmitting messages, making it ideal for quick and reliable communication in outdoor, work, or emergency settings.",
"",
"",
"// set units"
],
"properties": [
{
"commentStart": 360,
"end": 0,
"key": {
"commentStart": 360,
"end": 0,
"name": "defaultLengthUnit",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ObjectProperty",
"value": {
"abs_path": false,
"commentStart": 380,
"end": 0,
"name": {
"commentStart": 380,
"end": 0,
"name": "in",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"start": 0,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {},
"startNodes": [
{
"commentStart": 383,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"start": 0
}
}