---
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/type-args-test-binary-operator.js
---
Input:
function component(a, b) {
  if (a > b) {
    let m = {};
  }
}


Output:
{
  "type": "Program",
  "body": [
    {
      "type": "FunctionDeclaration",
      "id": {
        "type": "Identifier",
        "name": "component",
        "typeAnnotation": null,
        "loc": null,
        "range": [
          9,
          18
        ]
      },
      "params": [
        {
          "type": "Identifier",
          "name": "a",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            19,
            20
          ]
        },
        {
          "type": "Identifier",
          "name": "b",
          "typeAnnotation": null,
          "loc": null,
          "range": [
            22,
            23
          ]
        }
      ],
      "body": {
        "type": "BlockStatement",
        "body": [
          {
            "type": "IfStatement",
            "test": {
              "type": "BinaryExpression",
              "left": {
                "type": "Identifier",
                "name": "a",
                "typeAnnotation": null,
                "loc": null,
                "range": [
                  33,
                  34
                ]
              },
              "operator": ">",
              "right": {
                "type": "Identifier",
                "name": "b",
                "typeAnnotation": null,
                "loc": null,
                "range": [
                  37,
                  38
                ]
              },
              "loc": null,
              "range": [
                33,
                38
              ]
            },
            "consequent": {
              "type": "BlockStatement",
              "body": [
                {
                  "type": "VariableDeclaration",
                  "kind": "let",
                  "declarations": [
                    {
                      "type": "VariableDeclarator",
                      "id": {
                        "type": "Identifier",
                        "name": "m",
                        "typeAnnotation": null,
                        "loc": null,
                        "range": [
                          50,
                          51
                        ]
                      },
                      "init": {
                        "type": "ObjectExpression",
                        "properties": [],
                        "loc": null,
                        "range": [
                          54,
                          56
                        ]
                      },
                      "loc": null,
                      "range": [
                        50,
                        56
                      ]
                    }
                  ],
                  "loc": null,
                  "range": [
                    46,
                    57
                  ]
                }
              ],
              "loc": null,
              "range": [
                40,
                61
              ]
            },
            "alternate": null,
            "loc": null,
            "range": [
              29,
              61
            ]
          }
        ],
        "loc": null,
        "range": [
          25,
          63
        ]
      },
      "generator": false,
      "async": false,
      "loc": null,
      "range": [
        0,
        63
      ],
      "loc": null,
      "range": [
        0,
        63
      ]
    }
  ],
  "sourceType": "script",
  "loc": null,
  "range": [
    0,
    63
  ]
}
