pine-parser 0.1.0

Parser for Pine Script.
Documentation
[
  {
    "If": {
      "condition": {
        "Binary": {
          "left": {
            "Variable": "x"
          },
          "op": "Greater",
          "right": {
            "Literal": {
              "Int": 0
            }
          }
        }
      },
      "then_branch": [
        {
          "VarDecl": {
            "name": "a",
            "type_annotation": null,
            "initializer": {
              "Literal": {
                "Int": 1
              }
            }
          }
        },
        {
          "VarDecl": {
            "name": "b",
            "type_annotation": null,
            "initializer": {
              "Literal": {
                "Int": 2
              }
            }
          }
        }
      ],
      "else_if_branches": [],
      "else_branch": [
        {
          "VarDecl": {
            "name": "a",
            "type_annotation": null,
            "initializer": {
              "Unary": {
                "op": "Neg",
                "expr": {
                  "Literal": {
                    "Int": 1
                  }
                }
              }
            }
          }
        },
        {
          "VarDecl": {
            "name": "b",
            "type_annotation": null,
            "initializer": {
              "Unary": {
                "op": "Neg",
                "expr": {
                  "Literal": {
                    "Int": 2
                  }
                }
              }
            }
          }
        }
      ]
    }
  }
]