pine-parser 0.1.0

Parser for Pine Script.
Documentation
[
  {
    "VarDecl": {
      "name": "result",
      "type_annotation": null,
      "initializer": {
        "Ternary": {
          "condition": {
            "Binary": {
              "left": {
                "Variable": "x"
              },
              "op": "Greater",
              "right": {
                "Literal": {
                  "Int": 5
                }
              }
            }
          },
          "then_expr": {
            "Literal": {
              "Int": 10
            }
          },
          "else_expr": {
            "Literal": {
              "Int": 20
            }
          }
        }
      },
      "var_kind": "Var"
    }
  },
  {
    "VarDecl": {
      "name": "color",
      "type_annotation": null,
      "initializer": {
        "Ternary": {
          "condition": {
            "Variable": "isGreen"
          },
          "then_expr": {
            "Variable": "green"
          },
          "else_expr": {
            "Variable": "red"
          }
        }
      },
      "var_kind": "Var"
    }
  }
]