---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing pipe_as_arg.kcl
---
{
  "Ok": {
    "body": [
      {
        "commentStart": 0,
        "declaration": {
          "commentStart": 0,
          "end": 0,
          "id": {
            "commentStart": 0,
            "end": 0,
            "name": "cube",
            "start": 0,
            "type": "Identifier"
          },
          "init": {
            "body": {
              "body": [
                {
                  "argument": {
                    "abs_path": false,
                    "commentStart": 0,
                    "end": 0,
                    "name": {
                      "commentStart": 0,
                      "end": 0,
                      "name": "length",
                      "start": 0,
                      "type": "Identifier"
                    },
                    "path": [],
                    "start": 0,
                    "type": "Name",
                    "type": "Name"
                  },
                  "commentStart": 0,
                  "end": 0,
                  "start": 0,
                  "type": "ReturnStatement",
                  "type": "ReturnStatement"
                }
              ],
              "commentStart": 0,
              "end": 0,
              "start": 0
            },
            "commentStart": 0,
            "end": 0,
            "params": [
              {
                "type": "Parameter",
                "identifier": {
                  "commentStart": 0,
                  "end": 0,
                  "name": "length",
                  "start": 0,
                  "type": "Identifier"
                }
              },
              {
                "type": "Parameter",
                "identifier": {
                  "commentStart": 0,
                  "end": 0,
                  "name": "center",
                  "start": 0,
                  "type": "Identifier"
                }
              }
            ],
            "start": 0,
            "type": "FunctionExpression",
            "type": "FunctionExpression"
          },
          "start": 0,
          "type": "VariableDeclarator"
        },
        "end": 0,
        "kind": "fn",
        "start": 0,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "commentStart": 0,
        "declaration": {
          "commentStart": 0,
          "end": 0,
          "id": {
            "commentStart": 0,
            "end": 0,
            "name": "double",
            "start": 0,
            "type": "Identifier"
          },
          "init": {
            "body": {
              "body": [
                {
                  "argument": {
                    "commentStart": 0,
                    "end": 0,
                    "left": {
                      "abs_path": false,
                      "commentStart": 0,
                      "end": 0,
                      "name": {
                        "commentStart": 0,
                        "end": 0,
                        "name": "x",
                        "start": 0,
                        "type": "Identifier"
                      },
                      "path": [],
                      "start": 0,
                      "type": "Name",
                      "type": "Name"
                    },
                    "operator": "*",
                    "right": {
                      "commentStart": 0,
                      "end": 0,
                      "raw": "2",
                      "start": 0,
                      "type": "Literal",
                      "type": "Literal",
                      "value": {
                        "value": 2.0,
                        "suffix": "None"
                      }
                    },
                    "start": 0,
                    "type": "BinaryExpression",
                    "type": "BinaryExpression"
                  },
                  "commentStart": 0,
                  "end": 0,
                  "start": 0,
                  "type": "ReturnStatement",
                  "type": "ReturnStatement"
                }
              ],
              "commentStart": 0,
              "end": 0,
              "start": 0
            },
            "commentStart": 0,
            "end": 0,
            "params": [
              {
                "type": "Parameter",
                "identifier": {
                  "commentStart": 0,
                  "end": 0,
                  "name": "x",
                  "start": 0,
                  "type": "Identifier"
                },
                "labeled": false
              }
            ],
            "start": 0,
            "type": "FunctionExpression",
            "type": "FunctionExpression"
          },
          "start": 0,
          "type": "VariableDeclarator"
        },
        "end": 0,
        "kind": "fn",
        "start": 0,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "commentStart": 0,
        "declaration": {
          "commentStart": 0,
          "end": 0,
          "id": {
            "commentStart": 0,
            "end": 0,
            "name": "width",
            "start": 0,
            "type": "Identifier"
          },
          "init": {
            "body": {
              "body": [
                {
                  "argument": {
                    "commentStart": 0,
                    "end": 0,
                    "raw": "200",
                    "start": 0,
                    "type": "Literal",
                    "type": "Literal",
                    "value": {
                      "value": 200.0,
                      "suffix": "None"
                    }
                  },
                  "commentStart": 0,
                  "end": 0,
                  "start": 0,
                  "type": "ReturnStatement",
                  "type": "ReturnStatement"
                }
              ],
              "commentStart": 0,
              "end": 0,
              "start": 0
            },
            "commentStart": 0,
            "end": 0,
            "params": [],
            "start": 0,
            "type": "FunctionExpression",
            "type": "FunctionExpression"
          },
          "start": 0,
          "type": "VariableDeclarator"
        },
        "end": 0,
        "kind": "fn",
        "start": 0,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "commentStart": 0,
        "declaration": {
          "commentStart": 0,
          "end": 0,
          "id": {
            "commentStart": 0,
            "end": 0,
            "name": "myCube",
            "start": 0,
            "type": "Identifier"
          },
          "init": {
            "arguments": [
              {
                "type": "LabeledArg",
                "label": {
                  "commentStart": 0,
                  "end": 0,
                  "name": "length",
                  "start": 0,
                  "type": "Identifier"
                },
                "arg": {
                  "body": [
                    {
                      "commentStart": 0,
                      "end": 0,
                      "raw": "200",
                      "start": 0,
                      "type": "Literal",
                      "type": "Literal",
                      "value": {
                        "value": 200.0,
                        "suffix": "None"
                      }
                    },
                    {
                      "callee": {
                        "abs_path": false,
                        "commentStart": 0,
                        "end": 0,
                        "name": {
                          "commentStart": 0,
                          "end": 0,
                          "name": "double",
                          "start": 0,
                          "type": "Identifier"
                        },
                        "path": [],
                        "start": 0,
                        "type": "Name"
                      },
                      "commentStart": 0,
                      "end": 0,
                      "start": 0,
                      "type": "CallExpressionKw",
                      "type": "CallExpressionKw",
                      "unlabeled": {
                        "commentStart": 0,
                        "end": 0,
                        "start": 0,
                        "type": "PipeSubstitution",
                        "type": "PipeSubstitution"
                      }
                    }
                  ],
                  "commentStart": 0,
                  "end": 0,
                  "start": 0,
                  "type": "PipeExpression",
                  "type": "PipeExpression"
                }
              },
              {
                "type": "LabeledArg",
                "label": {
                  "commentStart": 0,
                  "end": 0,
                  "name": "center",
                  "start": 0,
                  "type": "Identifier"
                },
                "arg": {
                  "commentStart": 0,
                  "elements": [
                    {
                      "commentStart": 0,
                      "end": 0,
                      "raw": "0",
                      "start": 0,
                      "type": "Literal",
                      "type": "Literal",
                      "value": {
                        "value": 0.0,
                        "suffix": "None"
                      }
                    },
                    {
                      "commentStart": 0,
                      "end": 0,
                      "raw": "0",
                      "start": 0,
                      "type": "Literal",
                      "type": "Literal",
                      "value": {
                        "value": 0.0,
                        "suffix": "None"
                      }
                    }
                  ],
                  "end": 0,
                  "start": 0,
                  "type": "ArrayExpression",
                  "type": "ArrayExpression"
                }
              }
            ],
            "callee": {
              "abs_path": false,
              "commentStart": 0,
              "end": 0,
              "name": {
                "commentStart": 0,
                "end": 0,
                "name": "cube",
                "start": 0,
                "type": "Identifier"
              },
              "path": [],
              "start": 0,
              "type": "Name"
            },
            "commentStart": 0,
            "end": 0,
            "start": 0,
            "type": "CallExpressionKw",
            "type": "CallExpressionKw",
            "unlabeled": null
          },
          "start": 0,
          "type": "VariableDeclarator"
        },
        "end": 0,
        "kind": "const",
        "start": 0,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      }
    ],
    "commentStart": 0,
    "end": 0,
    "nonCodeMeta": {
      "nonCodeNodes": {
        "0": [
          {
            "commentStart": 0,
            "end": 0,
            "start": 0,
            "type": "NonCodeNode",
            "value": {
              "type": "newLine"
            }
          }
        ],
        "2": [
          {
            "commentStart": 0,
            "end": 0,
            "start": 0,
            "type": "NonCodeNode",
            "value": {
              "type": "newLine"
            }
          }
        ]
      },
      "startNodes": []
    },
    "start": 0
  }
}
