--- source: kcl-lib/src/simulation_tests.rs description: Result of parsing pipe.kcl --- { "Ok": { "body": [ { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "pipeInnerDiameter", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "2.0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.0, "suffix": "None" } }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "preComments": [ "// Define parameters" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "pipeOuterDiameter", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "2.375", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 2.375, "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": "pipeLength", "start": 0, "type": "Identifier" }, "init": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "6", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 6.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": "pipeBase", "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": "center", "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" } }, { "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" } }, { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "radius", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "end": 0, "left": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "pipeOuterDiameter", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "moduleId": 0, "operator": "/", "right": { "commentStart": 0, "end": 0, "moduleId": 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": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "circle", "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": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "pipeLength", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "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": { "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } } ], "commentStart": 0, "end": 0, "moduleId": 0, "nonCodeMeta": { "nonCodeNodes": { "2": [ { "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLineBlockComment", "value": "Extrude a hole through the length of the pipe", "style": "line" } } ] }, "startNodes": [] }, "start": 0, "type": "PipeExpression", "type": "PipeExpression" }, "moduleId": 0, "start": 0, "type": "VariableDeclarator" }, "end": 0, "kind": "const", "moduleId": 0, "preComments": [ "", "", "// Create the pipe base" ], "start": 0, "type": "VariableDeclaration", "type": "VariableDeclaration" }, { "commentStart": 0, "declaration": { "commentStart": 0, "end": 0, "id": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "pipe", "start": 0, "type": "Identifier" }, "init": { "body": [ { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "face", "start": 0, "type": "Identifier" }, "arg": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "END", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } } ], "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": "pipeBase", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "center", "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" } }, { "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" } }, { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "radius", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "end": 0, "left": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "pipeInnerDiameter", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "moduleId": 0, "operator": "/", "right": { "commentStart": 0, "end": 0, "moduleId": 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": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "circle", "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": "length", "start": 0, "type": "Identifier" }, "arg": { "argument": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "pipeLength", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" }, "commentStart": 0, "end": 0, "moduleId": 0, "operator": "-", "start": 0, "type": "UnaryExpression", "type": "UnaryExpression" } } ], "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": { "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "PipeSubstitution", "type": "PipeSubstitution" } }, { "arguments": [ { "type": "LabeledArg", "label": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "color", "start": 0, "type": "Identifier" }, "arg": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "\"#a24ed0\"", "start": 0, "type": "Literal", "type": "Literal", "value": "#a24ed0" } } ], "callee": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "appearance", "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, "innerAttrs": [ { "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "settings", "start": 0, "type": "Identifier" }, "preComments": [ "// Pipe", "// Piping for the pipe flange assembly", "", "", "// Set units" ], "properties": [ { "commentStart": 0, "end": 0, "key": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "defaultLengthUnit", "start": 0, "type": "Identifier" }, "moduleId": 0, "start": 0, "type": "ObjectProperty", "value": { "abs_path": false, "commentStart": 0, "end": 0, "moduleId": 0, "name": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "in", "start": 0, "type": "Identifier" }, "path": [], "start": 0, "type": "Name", "type": "Name" } }, { "commentStart": 0, "end": 0, "key": { "commentStart": 0, "end": 0, "moduleId": 0, "name": "kclVersion", "start": 0, "type": "Identifier" }, "moduleId": 0, "start": 0, "type": "ObjectProperty", "value": { "commentStart": 0, "end": 0, "moduleId": 0, "raw": "1.0", "start": 0, "type": "Literal", "type": "Literal", "value": { "value": 1.0, "suffix": "None" } } } ], "start": 0, "type": "Annotation" } ], "moduleId": 0, "nonCodeMeta": { "nonCodeNodes": {}, "startNodes": [ { "commentStart": 0, "end": 0, "moduleId": 0, "start": 0, "type": "NonCodeNode", "value": { "type": "newLine" } } ] }, "start": 0 } }