{
  "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
  "name": "dunstrc",
  "rules": {
    "config": {
      "type": "SEQ",
      "members": [
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "empty"
          }
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SEQ",
            "members": [
              {
                "type": "SYMBOL",
                "name": "entry"
              },
              {
                "type": "SYMBOL",
                "name": "separator"
              }
            ]
          }
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "entry"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "entry": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "section"
            },
            {
              "type": "SYMBOL",
              "name": "assign"
            }
          ]
        }
      ]
    },
    "section": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "["
        },
        {
          "type": "SYMBOL",
          "name": "name"
        },
        {
          "type": "STRING",
          "value": "]"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "ALIAS",
              "content": {
                "type": "PATTERN",
                "value": ".*"
              },
              "named": true,
              "value": "comment"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "name": {
      "type": "PATTERN",
      "value": "[^\\]\\n\\r]*"
    },
    "assign": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "key"
        },
        {
          "type": "STRING",
          "value": "="
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "value"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "key": {
      "type": "PATTERN",
      "value": "[^\\[#;=\\s\\n\\r][^;#=\\n\\r]*"
    },
    "value": {
      "type": "PATTERN",
      "value": "[^;#\\r\\n\"]*(\"[^\\r\\n\"]*\")?[^;#\\r\\n]*"
    },
    "separator": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "comment"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "newline"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "empty"
          }
        }
      ]
    },
    "empty": {
      "type": "SEQ",
      "members": [
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "comment"
            },
            {
              "type": "BLANK"
            }
          ]
        },
        {
          "type": "SYMBOL",
          "name": "newline"
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "SYMBOL",
              "name": "whitespace"
            },
            {
              "type": "BLANK"
            }
          ]
        }
      ]
    },
    "newline": {
      "type": "PATTERN",
      "value": "\\r?\\n"
    },
    "whitespace": {
      "type": "PATTERN",
      "value": "[ \\t]+"
    },
    "comment": {
      "type": "PATTERN",
      "value": "(#|;).*"
    }
  },
  "extras": [
    {
      "type": "SYMBOL",
      "name": "whitespace"
    }
  ],
  "conflicts": [],
  "precedences": [],
  "externals": [],
  "inline": [],
  "supertypes": [],
  "reserved": {}
}