pine-parser 0.2.1

Parser for Pine Script.
Documentation
[
  {
    "VarDecl": {
      "name": "x",
      "type_annotation": null,
      "initializer": {
        "Binary": {
          "left": {
            "Literal": {
              "Int": 10
            }
          },
          "op": "Add",
          "right": {
            "Literal": {
              "Int": 20
            }
          }
        }
      }
    }
  },
  {
    "VarDecl": {
      "name": "result",
      "type_annotation": null,
      "initializer": {
        "Ternary": {
          "condition": {
            "Binary": {
              "left": {
                "Variable": {
                  "name": "close"
                }
              },
              "op": "Greater",
              "right": {
                "Variable": {
                  "name": "open"
                }
              }
            }
          },
          "then_expr": {
            "Literal": {
              "Int": 1
            }
          },
          "else_expr": {
            "Literal": {
              "Int": 0
            }
          }
        }
      }
    }
  }
]