---
source: kcl-lib/src/parsing/parser.rs
expression: actual
---
{
  "body": [
    {
      "commentStart": 0,
      "declaration": {
        "commentStart": 3,
        "end": 35,
        "id": {
          "commentStart": 3,
          "end": 6,
          "moduleId": 0,
          "name": "foo",
          "start": 3,
          "type": "Identifier"
        },
        "init": {
          "body": {
            "body": [
              {
                "argument": {
                  "commentStart": 32,
                  "end": 33,
                  "moduleId": 0,
                  "raw": "1",
                  "start": 32,
                  "type": "Literal",
                  "type": "Literal",
                  "value": {
                    "value": 1.0,
                    "suffix": "None"
                  }
                },
                "commentStart": 25,
                "end": 33,
                "moduleId": 0,
                "start": 25,
                "type": "ReturnStatement",
                "type": "ReturnStatement"
              }
            ],
            "commentStart": 23,
            "end": 35,
            "moduleId": 0,
            "start": 23
          },
          "commentStart": 6,
          "end": 35,
          "moduleId": 0,
          "name": {
            "commentStart": 3,
            "end": 6,
            "moduleId": 0,
            "name": "foo",
            "start": 3,
            "type": "Identifier"
          },
          "params": [
            {
              "type": "Parameter",
              "identifier": {
                "commentStart": 7,
                "end": 8,
                "moduleId": 0,
                "name": "x",
                "start": 7,
                "type": "Identifier"
              },
              "param_type": {
                "None": null,
                "commentStart": 11,
                "end": 17,
                "moduleId": 0,
                "p_type": "Number",
                "start": 11,
                "type": "Primitive"
              },
              "default_value": {
                "commentStart": 20,
                "end": 21,
                "moduleId": 0,
                "raw": "2",
                "start": 20,
                "type": "Literal",
                "type": "Literal",
                "value": {
                  "value": 2.0,
                  "suffix": "None"
                }
              }
            }
          ],
          "start": 6,
          "type": "FunctionExpression",
          "type": "FunctionExpression"
        },
        "moduleId": 0,
        "start": 3,
        "type": "VariableDeclarator"
      },
      "end": 35,
      "kind": "fn",
      "moduleId": 0,
      "start": 0,
      "type": "VariableDeclaration",
      "type": "VariableDeclaration"
    }
  ],
  "commentStart": 0,
  "end": 35,
  "moduleId": 0,
  "start": 0
}
