--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing riddle_small.kcl --- { "Ok": { "body": [ { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "ANSWER", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "41803", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 41803.0, "suffix": "None" } }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "t", "start": 0, "type": "Identifier" }, "init": { "body": { "body": [ { "argument": { "commentStart": 0, "end": 0, "left": { "commentStart": 0, "end": 0, "left": { "commentStart": 0, "end": 0, "left": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "ANSWER", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "moduleId": 0, "operator": "*", "right": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "s", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "moduleId": 0, "operator": "+", "right": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "12345", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 12345.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "moduleId": 0, "operator": "%", "right": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "214748", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 214748.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "ReturnStatement", "type": "ReturnStatement" } ], "commentStart": 0, "end": 0, "moduleId": 0, "start": 0 }, "commentStart": 0, "end": 0, "moduleId": 0, "params": [ { "type": "Parameter", "identifier": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "s", "start": 0, "type": "Identifier" }, "labeled": false } ], "start": 0, "type": "FunctionExpression", "type": "FunctionExpression" }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "fn", "moduleId": 0, "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "xs", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "205804", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 205804.0, "suffix": "None" } }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "ys", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "71816", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 71816.0, "suffix": "None" } }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "ox", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "left": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "35", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, "suffix": "None" } }, "moduleId": 0, "operator": "-", "right": { "commentStart": 0, "end": 0, "left": { "arguments": [], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "t", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "xs", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, "moduleId": 0, "operator": "%", "right": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "70", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "oy", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "left": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "35", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 35.0, "suffix": "None" } }, "moduleId": 0, "operator": "-", "right": { "commentStart": 0, "end": 0, "left": { "arguments": [], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "t", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "ys", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, "moduleId": 0, "operator": "%", "right": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "70", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 70.0, "suffix": "None" } }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "start": 0, "type": "BinaryExpression", "type": "BinaryExpression" }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "r", "start": 0, "type": "Identifier" }, "init": { "body": [ { "arguments": [], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "startSketchOn", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "XZ", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "at", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "elements": [ { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "ox", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "oy", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } ], "end": 0, "moduleId": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" } } ], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "startProfile", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "end", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "elements": [ { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 0, "moduleId": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" } } ], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "line", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "end", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "elements": [ { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } }, { "argument": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, "commentStart": 0, "end": 0, "moduleId": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } ], "end": 0, "moduleId": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" } } ], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "line", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "end", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "elements": [ { "argument": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } }, "commentStart": 0, "end": 0, "moduleId": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" }, { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 0.0, "suffix": "None" } } ], "end": 0, "moduleId": 0, "start": 0, "type": "ArrayExpression", "type": "ArrayExpression" } } ], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "line", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null }, { "arguments": [], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "close", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": { "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "length", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "1", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } } ], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "extrude", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "CallExpressionKw", "type": "CallExpressionKw", "unlabeled": null } ], "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "PipeExpression", "type": "PipeExpression" }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" } ], "commentStart": 0, "end": 0, "moduleId": 0, "nonCodeMeta": { "nonCodeNodes": { "0": [ { "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ], "1": [ { "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "startNodes": [] }, "start": 0 } }