---
source: kcl/src/simulation_tests.rs
description: Result of parsing multi_transform.kcl
snapshot_kind: text
---
{
  "Ok": {
    "body": [
      {
        "declarations": [
          {
            "end": 111,
            "id": {
              "end": 12,
              "name": "transform",
              "start": 3,
              "type": "Identifier"
            },
            "init": {
              "body": {
                "body": [
                  {
                    "argument": {
                      "elements": [
                        {
                          "end": 68,
                          "properties": [
                            {
                              "end": 66,
                              "key": {
                                "end": 50,
                                "name": "translate",
                                "start": 41,
                                "type": "Identifier"
                              },
                              "start": 41,
                              "type": "ObjectProperty",
                              "value": {
                                "elements": [
                                  {
                                    "end": 59,
                                    "left": {
                                      "end": 55,
                                      "raw": "30",
                                      "start": 53,
                                      "type": "Literal",
                                      "type": "Literal",
                                      "value": 30
                                    },
                                    "operator": "*",
                                    "right": {
                                      "end": 59,
                                      "name": "i",
                                      "start": 58,
                                      "type": "Identifier",
                                      "type": "Identifier"
                                    },
                                    "start": 53,
                                    "type": "BinaryExpression",
                                    "type": "BinaryExpression"
                                  },
                                  {
                                    "end": 62,
                                    "raw": "0",
                                    "start": 61,
                                    "type": "Literal",
                                    "type": "Literal",
                                    "value": 0
                                  },
                                  {
                                    "end": 65,
                                    "raw": "0",
                                    "start": 64,
                                    "type": "Literal",
                                    "type": "Literal",
                                    "value": 0
                                  }
                                ],
                                "end": 66,
                                "start": 52,
                                "type": "ArrayExpression",
                                "type": "ArrayExpression"
                              }
                            }
                          ],
                          "start": 39,
                          "type": "ObjectExpression",
                          "type": "ObjectExpression"
                        },
                        {
                          "end": 105,
                          "properties": [
                            {
                              "end": 103,
                              "key": {
                                "end": 84,
                                "name": "rotation",
                                "start": 76,
                                "type": "Identifier"
                              },
                              "start": 76,
                              "type": "ObjectProperty",
                              "value": {
                                "end": 103,
                                "properties": [
                                  {
                                    "end": 101,
                                    "key": {
                                      "end": 93,
                                      "name": "angle",
                                      "start": 88,
                                      "type": "Identifier"
                                    },
                                    "start": 88,
                                    "type": "ObjectProperty",
                                    "value": {
                                      "end": 101,
                                      "left": {
                                        "end": 97,
                                        "raw": "45",
                                        "start": 95,
                                        "type": "Literal",
                                        "type": "Literal",
                                        "value": 45
                                      },
                                      "operator": "*",
                                      "right": {
                                        "end": 101,
                                        "name": "i",
                                        "start": 100,
                                        "type": "Identifier",
                                        "type": "Identifier"
                                      },
                                      "start": 95,
                                      "type": "BinaryExpression",
                                      "type": "BinaryExpression"
                                    }
                                  }
                                ],
                                "start": 86,
                                "type": "ObjectExpression",
                                "type": "ObjectExpression"
                              }
                            }
                          ],
                          "start": 74,
                          "type": "ObjectExpression",
                          "type": "ObjectExpression"
                        }
                      ],
                      "end": 109,
                      "start": 33,
                      "type": "ArrayExpression",
                      "type": "ArrayExpression"
                    },
                    "end": 109,
                    "start": 26,
                    "type": "ReturnStatement",
                    "type": "ReturnStatement"
                  }
                ],
                "end": 111,
                "start": 22
              },
              "end": 111,
              "params": [
                {
                  "type": "Parameter",
                  "identifier": {
                    "end": 17,
                    "name": "i",
                    "start": 16,
                    "type": "Identifier"
                  },
                  "optional": false
                }
              ],
              "start": 15,
              "type": "FunctionExpression",
              "type": "FunctionExpression"
            },
            "start": 3,
            "type": "VariableDeclarator"
          }
        ],
        "end": 111,
        "kind": "fn",
        "start": 0,
        "type": "VariableDeclaration",
        "type": "VariableDeclaration"
      },
      {
        "end": 303,
        "expression": {
          "body": [
            {
              "arguments": [
                {
                  "elements": [
                    {
                      "end": 128,
                      "raw": "0",
                      "start": 127,
                      "type": "Literal",
                      "type": "Literal",
                      "value": 0
                    },
                    {
                      "end": 131,
                      "raw": "0",
                      "start": 130,
                      "type": "Literal",
                      "type": "Literal",
                      "value": 0
                    }
                  ],
                  "end": 132,
                  "start": 126,
                  "type": "ArrayExpression",
                  "type": "ArrayExpression"
                }
              ],
              "callee": {
                "end": 125,
                "name": "startSketchAt",
                "start": 112,
                "type": "Identifier"
              },
              "end": 133,
              "optional": false,
              "start": 112,
              "type": "CallExpression",
              "type": "CallExpression"
            },
            {
              "arguments": [
                {
                  "end": 241,
                  "properties": [
                    {
                      "end": 166,
                      "key": {
                        "end": 162,
                        "name": "radius",
                        "start": 156,
                        "type": "Identifier"
                      },
                      "start": 156,
                      "type": "ObjectProperty",
                      "value": {
                        "end": 166,
                        "raw": "10",
                        "start": 164,
                        "type": "Literal",
                        "type": "Literal",
                        "value": 10
                      }
                    },
                    {
                      "end": 186,
                      "key": {
                        "end": 183,
                        "name": "numSides",
                        "start": 175,
                        "type": "Identifier"
                      },
                      "start": 175,
                      "type": "ObjectProperty",
                      "value": {
                        "end": 186,
                        "raw": "4",
                        "start": 185,
                        "type": "Literal",
                        "type": "Literal",
                        "value": 4
                      }
                    },
                    {
                      "end": 209,
                      "key": {
                        "end": 201,
                        "name": "center",
                        "start": 195,
                        "type": "Identifier"
                      },
                      "start": 195,
                      "type": "ObjectProperty",
                      "value": {
                        "elements": [
                          {
                            "end": 205,
                            "raw": "0",
                            "start": 204,
                            "type": "Literal",
                            "type": "Literal",
                            "value": 0
                          },
                          {
                            "end": 208,
                            "raw": "0",
                            "start": 207,
                            "type": "Literal",
                            "type": "Literal",
                            "value": 0
                          }
                        ],
                        "end": 209,
                        "start": 203,
                        "type": "ArrayExpression",
                        "type": "ArrayExpression"
                      }
                    },
                    {
                      "end": 234,
                      "key": {
                        "end": 227,
                        "name": "inscribed",
                        "start": 218,
                        "type": "Identifier"
                      },
                      "start": 218,
                      "type": "ObjectProperty",
                      "value": {
                        "end": 234,
                        "raw": "false",
                        "start": 229,
                        "type": "Literal",
                        "type": "Literal",
                        "value": false
                      }
                    }
                  ],
                  "start": 147,
                  "type": "ObjectExpression",
                  "type": "ObjectExpression"
                },
                {
                  "end": 244,
                  "start": 243,
                  "type": "PipeSubstitution",
                  "type": "PipeSubstitution"
                }
              ],
              "callee": {
                "end": 146,
                "name": "polygon",
                "start": 139,
                "type": "Identifier"
              },
              "end": 245,
              "optional": false,
              "start": 139,
              "type": "CallExpression",
              "type": "CallExpression"
            },
            {
              "arguments": [
                {
                  "end": 260,
                  "raw": "4",
                  "start": 259,
                  "type": "Literal",
                  "type": "Literal",
                  "value": 4
                },
                {
                  "end": 263,
                  "start": 262,
                  "type": "PipeSubstitution",
                  "type": "PipeSubstitution"
                }
              ],
              "callee": {
                "end": 258,
                "name": "extrude",
                "start": 251,
                "type": "Identifier"
              },
              "end": 264,
              "optional": false,
              "start": 251,
              "type": "CallExpression",
              "type": "CallExpression"
            },
            {
              "arguments": [
                {
                  "end": 288,
                  "raw": "3",
                  "start": 287,
                  "type": "Literal",
                  "type": "Literal",
                  "value": 3
                },
                {
                  "end": 299,
                  "name": "transform",
                  "start": 290,
                  "type": "Identifier",
                  "type": "Identifier"
                },
                {
                  "end": 302,
                  "start": 301,
                  "type": "PipeSubstitution",
                  "type": "PipeSubstitution"
                }
              ],
              "callee": {
                "end": 286,
                "name": "patternTransform",
                "start": 270,
                "type": "Identifier"
              },
              "end": 303,
              "optional": false,
              "start": 270,
              "type": "CallExpression",
              "type": "CallExpression"
            }
          ],
          "end": 303,
          "start": 112,
          "type": "PipeExpression",
          "type": "PipeExpression"
        },
        "start": 112,
        "type": "ExpressionStatement",
        "type": "ExpressionStatement"
      }
    ],
    "end": 305,
    "nonCodeMeta": {
      "nonCodeNodes": {
        "1": [
          {
            "end": 305,
            "start": 303,
            "type": "NonCodeNode",
            "value": {
              "type": "newLine"
            }
          }
        ]
      },
      "startNodes": []
    },
    "start": 0
  }
}
