* git mv src/wasm-lib rust Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv wasm-lib to workspace Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv kcl-lib Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv derive docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * resolve file paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * move more shit Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * make yarn build:wasm work Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix scripts Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * better references Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix cargo ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix reference Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * cargo sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix script Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix a dep Signed-off-by: Jess Frazelle <github@jessfraz.com> * sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * remove unused deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * Revert "remove unused deps" This reverts commit fbabdb062e275fd5cbc1476f8480a1afee15d972. * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * deps; 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> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
494 lines
17 KiB
Plaintext
494 lines
17 KiB
Plaintext
---
|
|
source: kcl/src/simulation_tests.rs
|
|
description: Result of parsing function_sketch_with_position.kcl
|
|
---
|
|
{
|
|
"Ok": {
|
|
"body": [
|
|
{
|
|
"declaration": {
|
|
"end": 218,
|
|
"id": {
|
|
"end": 6,
|
|
"name": "box",
|
|
"start": 3,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": {
|
|
"body": [
|
|
{
|
|
"declaration": {
|
|
"end": 200,
|
|
"id": {
|
|
"end": 28,
|
|
"name": "myBox",
|
|
"start": 23,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"body": [
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 49,
|
|
"raw": "'XY'",
|
|
"start": 45,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": "XY"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 44,
|
|
"name": "startSketchOn",
|
|
"start": 31,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 50,
|
|
"start": 31,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 74,
|
|
"name": "p",
|
|
"start": 73,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 77,
|
|
"start": 76,
|
|
"type": "PipeSubstitution",
|
|
"type": "PipeSubstitution"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 72,
|
|
"name": "startProfileAt",
|
|
"start": 58,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 78,
|
|
"start": 58,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"type": "Identifier",
|
|
"name": "end"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 99,
|
|
"raw": "0",
|
|
"start": 98,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 102,
|
|
"name": "l",
|
|
"start": 101,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
],
|
|
"end": 103,
|
|
"start": 97,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 90,
|
|
"name": "line",
|
|
"start": 86,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 104,
|
|
"start": 86,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"type": "Identifier",
|
|
"name": "end"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 125,
|
|
"name": "w",
|
|
"start": 124,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
{
|
|
"end": 128,
|
|
"raw": "0",
|
|
"start": 127,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 129,
|
|
"start": 123,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 116,
|
|
"name": "line",
|
|
"start": 112,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 130,
|
|
"start": 112,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"type": "Identifier",
|
|
"name": "end"
|
|
},
|
|
"arg": {
|
|
"elements": [
|
|
{
|
|
"end": 151,
|
|
"raw": "0",
|
|
"start": 150,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 155,
|
|
"name": "l",
|
|
"start": 154,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"end": 155,
|
|
"operator": "-",
|
|
"start": 153,
|
|
"type": "UnaryExpression",
|
|
"type": "UnaryExpression"
|
|
}
|
|
],
|
|
"end": 156,
|
|
"start": 149,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 142,
|
|
"name": "line",
|
|
"start": 138,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 157,
|
|
"start": 138,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"end": 172,
|
|
"start": 171,
|
|
"type": "PipeSubstitution",
|
|
"type": "PipeSubstitution"
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 170,
|
|
"name": "close",
|
|
"start": 165,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 173,
|
|
"start": 165,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
{
|
|
"arguments": [
|
|
{
|
|
"type": "LabeledArg",
|
|
"label": {
|
|
"type": "Identifier",
|
|
"name": "length"
|
|
},
|
|
"arg": {
|
|
"end": 199,
|
|
"name": "h",
|
|
"start": 198,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 188,
|
|
"name": "extrude",
|
|
"start": 181,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 200,
|
|
"start": 181,
|
|
"type": "CallExpressionKw",
|
|
"type": "CallExpressionKw",
|
|
"unlabeled": null
|
|
}
|
|
],
|
|
"end": 200,
|
|
"start": 31,
|
|
"type": "PipeExpression",
|
|
"type": "PipeExpression"
|
|
},
|
|
"start": 23,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 200,
|
|
"kind": "const",
|
|
"start": 23,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"argument": {
|
|
"end": 216,
|
|
"name": "myBox",
|
|
"start": 211,
|
|
"type": "Identifier",
|
|
"type": "Identifier"
|
|
},
|
|
"end": 216,
|
|
"start": 204,
|
|
"type": "ReturnStatement",
|
|
"type": "ReturnStatement"
|
|
}
|
|
],
|
|
"end": 218,
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"0": [
|
|
{
|
|
"end": 204,
|
|
"start": 200,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": []
|
|
},
|
|
"start": 19
|
|
},
|
|
"end": 218,
|
|
"params": [
|
|
{
|
|
"type": "Parameter",
|
|
"identifier": {
|
|
"end": 8,
|
|
"name": "p",
|
|
"start": 7,
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"identifier": {
|
|
"end": 11,
|
|
"name": "h",
|
|
"start": 10,
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"identifier": {
|
|
"end": 14,
|
|
"name": "l",
|
|
"start": 13,
|
|
"type": "Identifier"
|
|
}
|
|
},
|
|
{
|
|
"type": "Parameter",
|
|
"identifier": {
|
|
"end": 17,
|
|
"name": "w",
|
|
"start": 16,
|
|
"type": "Identifier"
|
|
}
|
|
}
|
|
],
|
|
"start": 6,
|
|
"type": "FunctionExpression",
|
|
"type": "FunctionExpression"
|
|
},
|
|
"start": 3,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 218,
|
|
"kind": "fn",
|
|
"start": 0,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
},
|
|
{
|
|
"declaration": {
|
|
"end": 249,
|
|
"id": {
|
|
"end": 225,
|
|
"name": "thing",
|
|
"start": 220,
|
|
"type": "Identifier"
|
|
},
|
|
"init": {
|
|
"arguments": [
|
|
{
|
|
"elements": [
|
|
{
|
|
"end": 234,
|
|
"raw": "0",
|
|
"start": 233,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 237,
|
|
"raw": "0",
|
|
"start": 236,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 0.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"end": 238,
|
|
"start": 232,
|
|
"type": "ArrayExpression",
|
|
"type": "ArrayExpression"
|
|
},
|
|
{
|
|
"end": 241,
|
|
"raw": "3",
|
|
"start": 240,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 3.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 244,
|
|
"raw": "6",
|
|
"start": 243,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 6.0,
|
|
"suffix": "None"
|
|
}
|
|
},
|
|
{
|
|
"end": 248,
|
|
"raw": "10",
|
|
"start": 246,
|
|
"type": "Literal",
|
|
"type": "Literal",
|
|
"value": {
|
|
"value": 10.0,
|
|
"suffix": "None"
|
|
}
|
|
}
|
|
],
|
|
"callee": {
|
|
"end": 231,
|
|
"name": "box",
|
|
"start": 228,
|
|
"type": "Identifier"
|
|
},
|
|
"end": 249,
|
|
"start": 228,
|
|
"type": "CallExpression",
|
|
"type": "CallExpression"
|
|
},
|
|
"start": 220,
|
|
"type": "VariableDeclarator"
|
|
},
|
|
"end": 249,
|
|
"kind": "const",
|
|
"start": 220,
|
|
"type": "VariableDeclaration",
|
|
"type": "VariableDeclaration"
|
|
}
|
|
],
|
|
"end": 250,
|
|
"nonCodeMeta": {
|
|
"nonCodeNodes": {
|
|
"0": [
|
|
{
|
|
"end": 220,
|
|
"start": 218,
|
|
"type": "NonCodeNode",
|
|
"value": {
|
|
"type": "newLine"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"startNodes": []
|
|
},
|
|
"start": 0
|
|
}
|
|
}
|