---
source: crates/react_hermes_parser/tests/parser_test.rs
expression: "format!(\"Input:\\n{input}\\n\\nOutput:\\n{output}\")"
input_file: crates/react_hermes_parser/tests/fixtures/issue852.js
---
Input:
function Component(c) {
  let x = { c };
  mutate(x);
  let a = x;
  let b = a;
}


Output:
{
  "type": "Program",
  "body": [
    {
      "type": "FunctionDeclaration",
      "id": {
        "type": "Identifier",
        "name": "Component",
        "typeAnnotation": null,
        "loc": null,
        "range": [
          9,
          18
        ]
      },
      "params": [
        {
          "type": "Identifier",
          "name": "c",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            19,
            20
          ]
        }
      ],
      "body": {
        "type": "BlockStatement",
        "body": [
          {
            "type": "VariableDeclaration",
            "kind": "let",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "x",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    30,
                    31
                  ]
                },
                "init": {
                  "type": "ObjectExpression",
                  "properties": [
                    {
                      "type": "Property",
                      "key": {
                        "type": "Identifier",
                        "name": "c",
                        "typeAnnotation": null,
                        "loc": null,
                        "range": [
                          36,
                          37
                        ]
                      },
                      "value": {
                        "type": "Identifier",
                        "name": "c",
                        "typeAnnotation": null,
                        "loc": null,
                        "range": [
                          36,
                          37
                        ]
                      },
                      "kind": "init",
                      "method": false,
                      "shorthand": true,
                      "computed": false,
                      "loc": null,
                      "range": [
                        36,
                        37
                      ]
                    }
                  ],
                  "loc": null,
                  "range": [
                    34,
                    39
                  ]
                },
                "loc": null,
                "range": [
                  30,
                  39
                ]
              }
            ],
            "loc": null,
            "range": [
              26,
              40
            ]
          },
          {
            "type": "ExpressionStatement",
            "expression": {
              "type": "CallExpression",
              "callee": {
                "type": "Identifier",
                "name": "mutate",
                "typeAnnotation": null,
                "loc": null,
                "range": [
                  43,
                  49
                ]
              },
              "arguments": [
                {
                  "type": "Identifier",
                  "name": "x",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    50,
                    51
                  ]
                }
              ],
              "loc": null,
              "range": [
                43,
                52
              ]
            },
            "directive": null,
            "loc": null,
            "range": [
              43,
              53
            ]
          },
          {
            "type": "VariableDeclaration",
            "kind": "let",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "a",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    60,
                    61
                  ]
                },
                "init": {
                  "type": "Identifier",
                  "name": "x",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    64,
                    65
                  ]
                },
                "loc": null,
                "range": [
                  60,
                  65
                ]
              }
            ],
            "loc": null,
            "range": [
              56,
              66
            ]
          },
          {
            "type": "VariableDeclaration",
            "kind": "let",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "b",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    73,
                    74
                  ]
                },
                "init": {
                  "type": "Identifier",
                  "name": "a",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    77,
                    78
                  ]
                },
                "loc": null,
                "range": [
                  73,
                  78
                ]
              }
            ],
            "loc": null,
            "range": [
              69,
              79
            ]
          }
        ],
        "loc": null,
        "range": [
          22,
          81
        ]
      },
      "generator": false,
      "async": false,
      "loc": null,
      "range": [
        0,
        81
      ],
      "loc": null,
      "range": [
        0,
        81
      ]
    }
  ],
  "sourceType": "script",
  "loc": null,
  "range": [
    0,
    81
  ]
}
