{
  "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json",
  "name": "hemar",
  "rules": {
    "source_file": {
      "type": "REPEAT",
      "content": {
        "type": "SYMBOL",
        "name": "element"
      }
    },
    "element": {
      "type": "CHOICE",
      "members": [
        {
          "type": "SYMBOL",
          "name": "interpolation"
        },
        {
          "type": "SYMBOL",
          "name": "segment"
        },
        {
          "type": "SYMBOL",
          "name": "text"
        },
        {
          "type": "SYMBOL",
          "name": "actual_bracket"
        }
      ]
    },
    "interpolation": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "{["
        },
        {
          "type": "SYMBOL",
          "name": "path"
        },
        {
          "type": "STRING",
          "value": "]}"
        }
      ]
    },
    "segment": {
      "type": "SEQ",
      "members": [
        {
          "type": "SYMBOL",
          "name": "for"
        },
        {
          "type": "REPEAT",
          "content": {
            "type": "SYMBOL",
            "name": "element"
          }
        },
        {
          "type": "SYMBOL",
          "name": "done"
        }
      ]
    },
    "for": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "{["
        },
        {
          "type": "STRING",
          "value": "for"
        },
        {
          "type": "SYMBOL",
          "name": "string"
        },
        {
          "type": "STRING",
          "value": "in"
        },
        {
          "type": "SYMBOL",
          "name": "path"
        },
        {
          "type": "STRING",
          "value": "]}"
        }
      ]
    },
    "done": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "{["
        },
        {
          "type": "STRING",
          "value": "done"
        },
        {
          "type": "STRING",
          "value": "]}"
        }
      ]
    },
    "actual_bracket": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "{["
        },
        {
          "type": "STRING",
          "value": "{["
        },
        {
          "type": "STRING",
          "value": "]}"
        }
      ]
    },
    "path": {
      "type": "CHOICE",
      "members": [
        {
          "type": "STRING",
          "value": "."
        },
        {
          "type": "SEQ",
          "members": [
            {
              "type": "CHOICE",
              "members": [
                {
                  "type": "SYMBOL",
                  "name": "string"
                },
                {
                  "type": "SYMBOL",
                  "name": "index"
                }
              ]
            },
            {
              "type": "REPEAT",
              "content": {
                "type": "SEQ",
                "members": [
                  {
                    "type": "STRING",
                    "value": "."
                  },
                  {
                    "type": "CHOICE",
                    "members": [
                      {
                        "type": "SYMBOL",
                        "name": "string"
                      },
                      {
                        "type": "SYMBOL",
                        "name": "index"
                      }
                    ]
                  }
                ]
              }
            }
          ]
        }
      ]
    },
    "index": {
      "type": "SEQ",
      "members": [
        {
          "type": "STRING",
          "value": "["
        },
        {
          "type": "CHOICE",
          "members": [
            {
              "type": "PATTERN",
              "value": "\\d"
            },
            {
              "type": "PATTERN",
              "value": "[1-9]\\d*"
            },
            {
              "type": "PATTERN",
              "value": "-[1-9]"
            },
            {
              "type": "PATTERN",
              "value": "-[1-9]\\d*"
            }
          ]
        },
        {
          "type": "STRING",
          "value": "]"
        }
      ]
    },
    "string": {
      "type": "CHOICE",
      "members": [
        {
          "type": "TOKEN",
          "content": {
            "type": "PREC",
            "value": -1,
            "content": {
              "type": "PATTERN",
              "value": "[^]\\[{} \\n\\t\\r.\\\\\"]+"
            }
          }
        },
        {
          "type": "TOKEN",
          "content": {
            "type": "PREC",
            "value": -1,
            "content": {
              "type": "PATTERN",
              "value": "\"([^\"]|\"\")*\""
            }
          }
        }
      ]
    },
    "text": {
      "type": "TOKEN",
      "content": {
        "type": "PREC",
        "value": -1,
        "content": {
          "type": "PATTERN",
          "value": "(?:\\{[^\\[]|[^{])+"
        }
      }
    }
  },
  "extras": [
    {
      "type": "PATTERN",
      "value": "\\s"
    }
  ],
  "conflicts": [],
  "precedences": [],
  "externals": [],
  "inline": [],
  "supertypes": [],
  "reserved": {}
}