---
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/ssa-property-call.js
---
Input:
function foo() {
  const x = [];
  const y = { x: x };
  y.x.push([]);
  return y;
}


Output:
{
  "type": "Program",
  "body": [
    {
      "type": "FunctionDeclaration",
      "id": {
        "type": "Identifier",
        "name": "foo",
        "typeAnnotation": null,
        "loc": null,
        "range": [
          9,
          12
        ]
      },
      "params": [],
      "body": {
        "type": "BlockStatement",
        "body": [
          {
            "type": "VariableDeclaration",
            "kind": "const",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "x",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    25,
                    26
                  ]
                },
                "init": {
                  "type": "ArrayExpression",
                  "elements": [],
                  "loc": null,
                  "range": [
                    29,
                    31
                  ]
                },
                "loc": null,
                "range": [
                  25,
                  31
                ]
              }
            ],
            "loc": null,
            "range": [
              19,
              32
            ]
          },
          {
            "type": "VariableDeclaration",
            "kind": "const",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "y",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    41,
                    42
                  ]
                },
                "init": {
                  "type": "ObjectExpression",
                  "properties": [
                    {
                      "type": "Property",
                      "key": {
                        "type": "Identifier",
                        "name": "x",
                        "typeAnnotation": null,
                        "loc": null,
                        "range": [
                          47,
                          48
                        ]
                      },
                      "value": {
                        "type": "Identifier",
                        "name": "x",
                        "typeAnnotation": null,
                        "loc": null,
                        "range": [
                          50,
                          51
                        ]
                      },
                      "kind": "init",
                      "method": false,
                      "shorthand": false,
                      "computed": false,
                      "loc": null,
                      "range": [
                        47,
                        51
                      ]
                    }
                  ],
                  "loc": null,
                  "range": [
                    45,
                    53
                  ]
                },
                "loc": null,
                "range": [
                  41,
                  53
                ]
              }
            ],
            "loc": null,
            "range": [
              35,
              54
            ]
          },
          {
            "type": "ExpressionStatement",
            "expression": {
              "type": "CallExpression",
              "callee": {
                "type": "MemberExpression",
                "object": {
                  "type": "MemberExpression",
                  "object": {
                    "type": "Identifier",
                    "name": "y",
                    "typeAnnotation": null,
                    "loc": null,
                    "range": [
                      57,
                      58
                    ]
                  },
                  "property": {
                    "type": "Identifier",
                    "name": "x",
                    "typeAnnotation": null,
                    "loc": null,
                    "range": [
                      59,
                      60
                    ]
                  },
                  "computed": false,
                  "loc": null,
                  "range": [
                    57,
                    60
                  ]
                },
                "property": {
                  "type": "Identifier",
                  "name": "push",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    61,
                    65
                  ]
                },
                "computed": false,
                "loc": null,
                "range": [
                  57,
                  65
                ]
              },
              "arguments": [
                {
                  "type": "ArrayExpression",
                  "elements": [],
                  "loc": null,
                  "range": [
                    66,
                    68
                  ]
                }
              ],
              "loc": null,
              "range": [
                57,
                69
              ]
            },
            "directive": null,
            "loc": null,
            "range": [
              57,
              70
            ]
          },
          {
            "type": "ReturnStatement",
            "argument": {
              "type": "Identifier",
              "name": "y",
              "typeAnnotation": null,
              "loc": null,
              "range": [
                80,
                81
              ]
            },
            "loc": null,
            "range": [
              73,
              82
            ]
          }
        ],
        "loc": null,
        "range": [
          15,
          84
        ]
      },
      "generator": false,
      "async": false,
      "loc": null,
      "range": [
        0,
        84
      ],
      "loc": null,
      "range": [
        0,
        84
      ]
    }
  ],
  "sourceType": "script",
  "loc": null,
  "range": [
    0,
    84
  ]
}
