---
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/error.invalid-pass-hook-as-call-arg.js
---
Input:
function Component(props) {
  return foo(useFoo);
}


Output:
{
  "type": "Program",
  "body": [
    {
      "type": "FunctionDeclaration",
      "id": {
        "type": "Identifier",
        "name": "Component",
        "typeAnnotation": null,
        "loc": null,
        "range": [
          9,
          18
        ]
      },
      "params": [
        {
          "type": "Identifier",
          "name": "props",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            19,
            24
          ]
        }
      ],
      "body": {
        "type": "BlockStatement",
        "body": [
          {
            "type": "ReturnStatement",
            "argument": {
              "type": "CallExpression",
              "callee": {
                "type": "Identifier",
                "name": "foo",
                "typeAnnotation": null,
                "loc": null,
                "range": [
                  37,
                  40
                ]
              },
              "arguments": [
                {
                  "type": "Identifier",
                  "name": "useFoo",
                  "typeAnnotation": null,
                  "loc": null,
                  "range": [
                    41,
                    47
                  ]
                }
              ],
              "loc": null,
              "range": [
                37,
                48
              ]
            },
            "loc": null,
            "range": [
              30,
              49
            ]
          }
        ],
        "loc": null,
        "range": [
          26,
          51
        ]
      },
      "generator": false,
      "async": false,
      "loc": null,
      "range": [
        0,
        51
      ],
      "loc": null,
      "range": [
        0,
        51
      ]
    }
  ],
  "sourceType": "script",
  "loc": null,
  "range": [
    0,
    51
  ]
}
