pine-parser 0.2.2

Parser for Pine Script.
Documentation
[
  {
    "VarDecl": {
      "name": "x",
      "type_annotation": null,
      "initializer": {
        "Literal": {
          "Int": 5
        }
      },
      "var_kind": "Var"
    }
  },
  {
    "VarDecl": {
      "name": "result",
      "type_annotation": "string",
      "initializer": {
        "IfExpr": {
          "condition": {
            "Binary": {
              "left": {
                "Variable": {
                  "name": "x"
                }
              },
              "op": "Less",
              "right": {
                "Literal": {
                  "Int": 0
                }
              }
            }
          },
          "then_expr": {
            "Literal": {
              "String": "negative"
            }
          },
          "else_if_branches": [
            [
              {
                "Binary": {
                  "left": {
                    "Variable": {
                      "name": "x"
                    }
                  },
                  "op": "Eq",
                  "right": {
                    "Literal": {
                      "Int": 0
                    }
                  }
                }
              },
              {
                "Literal": {
                  "String": "zero"
                }
              }
            ],
            [
              {
                "Binary": {
                  "left": {
                    "Variable": {
                      "name": "x"
                    }
                  },
                  "op": "Less",
                  "right": {
                    "Literal": {
                      "Int": 10
                    }
                  }
                }
              },
              {
                "Literal": {
                  "String": "small"
                }
              }
            ]
          ],
          "else_expr": {
            "Literal": {
              "String": "large"
            }
          }
        }
      }
    }
  }
]