Files
modeling-app/rust/kcl-lib/tests/kcl_samples/walkie-talkie/ast.snap
Josh Gomez 656eb0abec Update all KCL-Samples to be more ME friendly (#6132)
* update all kcl-samples

* updates

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

* fixes

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

* updates

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

* updates

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

* Update kcl-samples simulation test output

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-04 11:03:13 -07:00

2274 lines
70 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": "parameters.kcl"
},
"preComments": [
"// import constants"
],
"selector": {
"commentStart": 412,
"end": 0,
"start": 0,
"type": "Glob"
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 435,
"end": 0,
"path": {
"type": "Kcl",
"filename": "body.kcl"
},
"preComments": [
"",
"",
"// import parts and parameters"
],
"selector": {
"type": "None",
"alias": {
"commentStart": 489,
"end": 0,
"name": "body",
"start": 0,
"type": "Identifier"
}
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 494,
"end": 0,
"path": {
"type": "Kcl",
"filename": "case.kcl"
},
"selector": {
"type": "None",
"alias": {
"commentStart": 515,
"end": 0,
"name": "case",
"start": 0,
"type": "Identifier"
}
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 520,
"end": 0,
"path": {
"type": "Kcl",
"filename": "antenna.kcl"
},
"selector": {
"type": "None",
"alias": {
"commentStart": 544,
"end": 0,
"name": "antenna",
"start": 0,
"type": "Identifier"
}
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 552,
"end": 0,
"path": {
"type": "Kcl",
"filename": "talk-button.kcl"
},
"selector": {
"type": "None",
"alias": {
"commentStart": 580,
"end": 0,
"name": "talkButton",
"start": 0,
"type": "Identifier"
}
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 591,
"end": 0,
"path": {
"type": "Kcl",
"filename": "knob.kcl"
},
"selector": {
"type": "None",
"alias": {
"commentStart": 612,
"end": 0,
"name": "knob",
"start": 0,
"type": "Identifier"
}
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 617,
"end": 0,
"path": {
"type": "Kcl",
"filename": "button.kcl"
},
"selector": {
"type": "List",
"items": [
{
"alias": null,
"commentStart": 624,
"end": 0,
"name": {
"commentStart": 624,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"start": 0,
"type": "ImportItem"
}
]
},
"start": 0,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"commentStart": 648,
"end": 0,
"expression": {
"abs_path": false,
"commentStart": 669,
"end": 0,
"name": {
"commentStart": 669,
"end": 0,
"name": "body",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"preComments": [
"",
"",
"// Import the body"
],
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 673,
"end": 0,
"expression": {
"body": [
{
"abs_path": false,
"commentStart": 697,
"end": 0,
"name": {
"commentStart": 697,
"end": 0,
"name": "antenna",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 720,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 724,
"end": 0,
"left": {
"commentStart": 724,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 725,
"end": 0,
"name": {
"commentStart": 725,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 724,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 733,
"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": 737,
"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": 742,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 747,
"end": 0,
"raw": "0.10",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.1,
"suffix": "None"
}
},
"commentStart": 746,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 753,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 757,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 757,
"end": 0,
"name": {
"commentStart": 757,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 766,
"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": 710,
"end": 0,
"name": {
"commentStart": 710,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 710,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 697,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 768,
"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": 789,
"end": 0,
"expression": {
"body": [
{
"abs_path": false,
"commentStart": 789,
"end": 0,
"name": {
"commentStart": 789,
"end": 0,
"name": "case",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 809,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 813,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 816,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 821,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 820,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 824,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 828,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 799,
"end": 0,
"name": {
"commentStart": 799,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 799,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 789,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 830,
"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": 858,
"end": 0,
"expression": {
"body": [
{
"abs_path": false,
"commentStart": 858,
"end": 0,
"name": {
"commentStart": 858,
"end": 0,
"name": "talkButton",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 884,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 888,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 888,
"end": 0,
"name": {
"commentStart": 888,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 896,
"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": 899,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 903,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 904,
"end": 0,
"name": {
"commentStart": 904,
"end": 0,
"name": "thickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 903,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 916,
"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": 919,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 923,
"end": 0,
"raw": ".5",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.5,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 874,
"end": 0,
"name": {
"commentStart": 874,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 874,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 858,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 926,
"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": 957,
"end": 0,
"expression": {
"body": [
{
"abs_path": false,
"commentStart": 957,
"end": 0,
"name": {
"commentStart": 957,
"end": 0,
"name": "knob",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 977,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 981,
"end": 0,
"left": {
"commentStart": 981,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 981,
"end": 0,
"name": {
"commentStart": 981,
"end": 0,
"name": "width",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 989,
"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": 993,
"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": 999,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1003,
"end": 0,
"left": {
"argument": {
"abs_path": false,
"commentStart": 1004,
"end": 0,
"name": {
"commentStart": 1004,
"end": 0,
"name": "thickness",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"commentStart": 1003,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
},
"operator": "/",
"right": {
"commentStart": 1016,
"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": 1019,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1023,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1023,
"end": 0,
"name": {
"commentStart": 1023,
"end": 0,
"name": "height",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1032,
"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": 967,
"end": 0,
"name": {
"commentStart": 967,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 967,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 957,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"commentStart": 1034,
"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": 1058,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1058,
"end": 0,
"name": {
"commentStart": 1058,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1058,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1082,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1088,
"end": 0,
"left": {
"commentStart": 1088,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1088,
"end": 0,
"name": {
"commentStart": 1088,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1102,
"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": 1106,
"end": 0,
"name": {
"commentStart": 1106,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1086,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1118,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1123,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1122,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1126,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"abs_path": false,
"commentStart": 1130,
"end": 0,
"name": {
"commentStart": 1130,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1072,
"end": 0,
"name": {
"commentStart": 1072,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1072,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1058,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 1147,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1147,
"end": 0,
"name": {
"commentStart": 1147,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1147,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1171,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1177,
"end": 0,
"left": {
"commentStart": 1177,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1177,
"end": 0,
"name": {
"commentStart": 1177,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1191,
"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": 1195,
"end": 0,
"name": {
"commentStart": 1195,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"commentStart": 1175,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1207,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1212,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1211,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1215,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1219,
"end": 0,
"left": {
"commentStart": 1219,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1219,
"end": 0,
"name": {
"commentStart": 1219,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 1237,
"end": 0,
"name": {
"commentStart": 1237,
"end": 0,
"name": "buttonHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"start": 0,
"type": "BinaryExpression",
"type": "BinaryExpression"
},
"operator": "-",
"right": {
"commentStart": 1253,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1253,
"end": 0,
"name": {
"commentStart": 1253,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1265,
"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": 1161,
"end": 0,
"name": {
"commentStart": 1161,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1161,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1147,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 1269,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1269,
"end": 0,
"name": {
"commentStart": 1269,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1269,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1308,
"end": 0,
"name": "roll",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1315,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1325,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1333,
"end": 0,
"raw": "180",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 180.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1345,
"end": 0,
"name": "yaw",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1351,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1283,
"end": 0,
"name": {
"commentStart": 1283,
"end": 0,
"name": "rotate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1283,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"commentStart": 1298,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1384,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1388,
"end": 0,
"left": {
"commentStart": 1388,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1388,
"end": 0,
"name": {
"commentStart": 1388,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1402,
"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": 1406,
"end": 0,
"name": {
"commentStart": 1406,
"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": 1424,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1429,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1428,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1439,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1443,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1443,
"end": 0,
"name": {
"commentStart": 1443,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"abs_path": false,
"commentStart": 1461,
"end": 0,
"name": {
"commentStart": 1461,
"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": 1482,
"end": 0,
"name": "global",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1491,
"end": 0,
"raw": "true",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": true
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1366,
"end": 0,
"name": {
"commentStart": 1366,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1366,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1269,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 0,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"commentStart": 1504,
"end": 0,
"expression": {
"body": [
{
"arguments": [],
"callee": {
"abs_path": false,
"commentStart": 1504,
"end": 0,
"name": {
"commentStart": 1504,
"end": 0,
"name": "button",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1504,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1543,
"end": 0,
"name": "roll",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1550,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1560,
"end": 0,
"name": "pitch",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1568,
"end": 0,
"raw": "180",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 180.0,
"suffix": "None"
}
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1580,
"end": 0,
"name": "yaw",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1586,
"end": 0,
"raw": "0",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 0.0,
"suffix": "None"
}
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1518,
"end": 0,
"name": {
"commentStart": 1518,
"end": 0,
"name": "rotate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1518,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": {
"commentStart": 1533,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
},
{
"arguments": [
{
"type": "LabeledArg",
"label": {
"commentStart": 1619,
"end": 0,
"name": "x",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1623,
"end": 0,
"left": {
"commentStart": 1623,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1623,
"end": 0,
"name": {
"commentStart": 1623,
"end": 0,
"name": "screenWidth",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "/",
"right": {
"commentStart": 1637,
"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": 1641,
"end": 0,
"name": {
"commentStart": 1641,
"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": 1659,
"end": 0,
"name": "y",
"start": 0,
"type": "Identifier"
},
"arg": {
"argument": {
"commentStart": 1664,
"end": 0,
"raw": "1",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
"value": 1.0,
"suffix": "None"
}
},
"commentStart": 1663,
"end": 0,
"operator": "-",
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
},
{
"type": "LabeledArg",
"label": {
"commentStart": 1674,
"end": 0,
"name": "z",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1678,
"end": 0,
"left": {
"commentStart": 1678,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1678,
"end": 0,
"name": {
"commentStart": 1678,
"end": 0,
"name": "screenYPosition",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "-",
"right": {
"commentStart": 1697,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1697,
"end": 0,
"name": {
"commentStart": 1697,
"end": 0,
"name": "buttonHeight",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1712,
"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": 1718,
"end": 0,
"left": {
"abs_path": false,
"commentStart": 1718,
"end": 0,
"name": {
"commentStart": 1718,
"end": 0,
"name": "tolerance",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name",
"type": "Name"
},
"operator": "*",
"right": {
"commentStart": 1730,
"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": 1741,
"end": 0,
"name": "global",
"start": 0,
"type": "Identifier"
},
"arg": {
"commentStart": 1750,
"end": 0,
"raw": "true",
"start": 0,
"type": "Literal",
"type": "Literal",
"value": true
}
}
],
"callee": {
"abs_path": false,
"commentStart": 1601,
"end": 0,
"name": {
"commentStart": 1601,
"end": 0,
"name": "translate",
"start": 0,
"type": "Identifier"
},
"path": [],
"start": 0,
"type": "Name"
},
"commentStart": 1601,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"commentStart": 1504,
"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
}
}