---
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/overlapping-scopes-interleaved.js
---
Input:
function foo(a, b) {
  let x = [];
  let y = [];
  x.push(a);
  y.push(b);
}


Output:
{
  "type": "Program",
  "body": [
    {
      "type": "FunctionDeclaration",
      "id": {
        "type": "Identifier",
        "name": "foo",
        "typeAnnotation": null,
        "loc": null,
        "range": [
          9,
          12
        ]
      },
      "params": [
        {
          "type": "Identifier",
          "name": "a",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            13,
            14
          ]
        },
        {
          "type": "Identifier",
          "name": "b",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            16,
            17
          ]
        }
      ],
      "body": {
        "type": "BlockStatement",
        "body": [
          {
            "type": "VariableDeclaration",
            "kind": "let",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "x",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    27,
                    28
                  ]
                },
                "init": {
                  "type": "ArrayExpression",
                  "elements": [],
                  "loc": null,
                  "range": [
                    31,
                    33
                  ]
                },
                "loc": null,
                "range": [
                  27,
                  33
                ]
              }
            ],
            "loc": null,
            "range": [
              23,
              34
            ]
          },
          {
            "type": "VariableDeclaration",
            "kind": "let",
            "declarations": [
              {
                "type": "VariableDeclarator",
                "id": {
                  "type": "Identifier",
                  "name": "y",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    41,
                    42
                  ]
                },
                "init": {
                  "type": "ArrayExpression",
                  "elements": [],
                  "loc": null,
                  "range": [
                    45,
                    47
                  ]
                },
                "loc": null,
                "range": [
                  41,
                  47
                ]
              }
            ],
            "loc": null,
            "range": [
              37,
              48
            ]
          },
          {
            "type": "ExpressionStatement",
            "expression": {
              "type": "CallExpression",
              "callee": {
                "type": "MemberExpression",
                "object": {
                  "type": "Identifier",
                  "name": "x",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    51,
                    52
                  ]
                },
                "property": {
                  "type": "Identifier",
                  "name": "push",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    53,
                    57
                  ]
                },
                "computed": false,
                "loc": null,
                "range": [
                  51,
                  57
                ]
              },
              "arguments": [
                {
                  "type": "Identifier",
                  "name": "a",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    58,
                    59
                  ]
                }
              ],
              "loc": null,
              "range": [
                51,
                60
              ]
            },
            "directive": null,
            "loc": null,
            "range": [
              51,
              61
            ]
          },
          {
            "type": "ExpressionStatement",
            "expression": {
              "type": "CallExpression",
              "callee": {
                "type": "MemberExpression",
                "object": {
                  "type": "Identifier",
                  "name": "y",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    64,
                    65
                  ]
                },
                "property": {
                  "type": "Identifier",
                  "name": "push",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    66,
                    70
                  ]
                },
                "computed": false,
                "loc": null,
                "range": [
                  64,
                  70
                ]
              },
              "arguments": [
                {
                  "type": "Identifier",
                  "name": "b",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    71,
                    72
                  ]
                }
              ],
              "loc": null,
              "range": [
                64,
                73
              ]
            },
            "directive": null,
            "loc": null,
            "range": [
              64,
              74
            ]
          }
        ],
        "loc": null,
        "range": [
          19,
          76
        ]
      },
      "generator": false,
      "async": false,
      "loc": null,
      "range": [
        0,
        76
      ],
      "loc": null,
      "range": [
        0,
        76
      ]
    }
  ],
  "sourceType": "script",
  "loc": null,
  "range": [
    0,
    76
  ]
}
