pine-parser 0.2.1

Parser for Pine Script.
Documentation
[
  {
    "VarDecl": {
      "name": "result",
      "type_annotation": null,
      "initializer": {
        "Switch": {
          "value": {
            "Variable": {
              "name": "mode"
            }
          },
          "cases": [
            [
              {
                "Literal": {
                  "String": "option1"
                }
              },
              {
                "Literal": {
                  "Int": 10
                }
              }
            ],
            [
              {
                "Literal": {
                  "String": "option2"
                }
              },
              {
                "Literal": {
                  "Int": 20
                }
              }
            ],
            [
              {
                "Literal": {
                  "Bool": true
                }
              },
              {
                "Literal": {
                  "Int": 30
                }
              }
            ]
          ]
        }
      }
    }
  },
  {
    "VarDecl": {
      "name": "value",
      "type_annotation": null,
      "initializer": {
        "Switch": {
          "value": {
            "Variable": {
              "name": "x"
            }
          },
          "cases": [
            [
              {
                "Literal": {
                  "Bool": true
                }
              },
              {
                "Literal": {
                  "Int": 0
                }
              }
            ]
          ]
        }
      }
    }
  }
]