{
  "$comment": "Port this schema to https://github.com/zyedidia/micro repository.",
  "$id": "https://json.schemastore.org/micro-syntax.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "definitions": {
    "string-or-region": {
      "oneOf": [
        {
          "title": "rule",
          "type": "string",
          "minLength": 1
        },
        {
          "type": "object",
          "properties": {
            "start": {
              "description": "A region start\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
              "type": "string",
              "minLength": 1,
              "examples": ["//"]
            },
            "end": {
              "description": "A region end\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
              "type": "string",
              "minLength": 1,
              "examples": ["$"]
            },
            "skip": {
              "description": "Ignored region sequences\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
              "type": "string",
              "minLength": 1,
              "examples": ["\\\\."]
            },
            "rules": {
              "$ref": "#/definitions/rules"
            }
          },
          "additionalProperties": false
        }
      ]
    },
    "rules": {
      "description": "Rules\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
      "type": "array",
      "uniqueItems": true,
      "items": {
        "description": "A rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
        "type": "object",
        "properties": {
          "comment": {
            "title": "comment rule region",
            "description": "A comment rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "comment.line": {
            "title": "line comment rule region",
            "description": "A line comment rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "comment.block": {
            "title": "block comment rule region",
            "description": "A block comment rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier": {
            "title": "identifier rule region",
            "description": "An identifier rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.builtin": {
            "title": "builtin identifier rule region",
            "description": "A builtin identifier rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.type": {
            "title": "type identifier rule region",
            "description": "A type rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.type.builtin": {
            "title": "builtin type identifier rule region",
            "description": "A builtin type rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.callable": {
            "title": "callable identifier rule region",
            "description": "A callable identifier rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.callable.builtin": {
            "title": "builtin callable identifier rule region",
            "description": "A builtin callable identifier rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.macro": {
            "title": "macro identifier rule region",
            "description": "A macro rule\nAlso used for functions\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.macro.builtin": {
            "title": "builtin macro identifier rule region",
            "description": "A builtin macro rule\nAlso used for functions\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.var": {
            "title": "variable identifier rule region",
            "description": "A variable identifier rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.var.builtin": {
            "title": "builtin variable identifier rule region",
            "description": "A builtin variable identifier rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant": {
            "title": "constant rule region",
            "description": "A constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "identifier.null": {
            "title": "null identifier rule region",
            "description": "A null rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.bool": {
            "title": "bool constant rule region",
            "description": "A bool constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.bool.true": {
            "title": "true bool constant rule region",
            "description": "A true bool constant rule\n`.builtin` suffix is not used\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.bool.false": {
            "title": "false bool constant rule region",
            "description": "A false bool constant rule\n`.builtin` suffix is not used\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.number": {
            "title": "number constant rule region",
            "description": "A number constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.number.integer": {
            "title": "integer number constant rule region",
            "description": "A integer number constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.number.float": {
            "title": "float number constant rule region",
            "description": "A float number constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.number.complex": {
            "title": "complex number constant rule region",
            "description": "A complex number constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.string": {
            "title": "string constant rule region",
            "description": "A string constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.string.builtin": {
            "title": "builtin string constant rule region",
            "description": "A builtin string constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.string.url": {
            "title": "url string constant rule region",
            "description": "A url string constant rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.string.escape": {
            "title": "escape string constant rule region",
            "description": "A escape string constant rule\n`.builtin` suffix is not used\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "constant.string.format": {
            "title": "string format specifier constant rule region",
            "description": "A string format specifier constant rule\n`.builtin` suffix is not used\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "statement": {
            "title": "statement rule region",
            "description": "A statement rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "symbol": {
            "title": "symbol rule region",
            "description": "A symbol rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "symbol.brackets": {
            "title": "bracket symbol rule region",
            "description": "A bracket symbol rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "symbol.operator": {
            "title": "operator symbol rule region",
            "description": "An operator symbol rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "symbol.tag": {
            "title": "tag symbol rule region",
            "description": "A tag symbol rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "preproc": {
            "title": "preprocessor rule region",
            "description": "A preprocessor rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "preproc.shebang": {
            "title": "shebang preprocessor rule region",
            "description": "A shebang preprocessor rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "type": {
            "title": "type rule region",
            "description": "A type rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "type.builtin": {
            "title": "builtin type rule region",
            "description": "A builtin type rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "type.keyword": {
            "title": "keyword type rule region",
            "description": "A keyword type rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region"
          },
          "todo": {
            "title": "todo region",
            "description": "A todo rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "$ref": "#/definitions/string-or-region",
            "examples": ["(TODO|XXX|FIXME)"]
          },
          "include": {
            "description": "An include\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
            "type": "string",
            "examples": ["javascript"]
          }
        },
        "additionalProperties": {
          "title": "rule region",
          "description": "A rule\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-rules",
          "$ref": "#/definitions/string-or-region"
        }
      }
    }
  },
  "description": "A syntax\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#syntax-files",
  "properties": {
    "filetype": {
      "description": "A file type\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#filetype-definition",
      "type": "string",
      "minLength": 1,
      "examples": ["go"]
    },
    "detect": {
      "title": "detection options",
      "description": "Detection options\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#detect-definition",
      "type": "object",
      "properties": {
        "filename": {
          "description": "A file name\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#detect-definition",
          "type": "string",
          "minLength": 1,
          "examples": ["\\.go$"]
        },
        "header": {
          "description": "A file header\nhttps://github.com/zyedidia/micro/blob/master/runtime/help/colors.md#detect-definition",
          "type": "string",
          "minLength": 1,
          "examples": ["%YAML"]
        }
      },
      "additionalProperties": false
    },
    "rules": {
      "title": "rule",
      "$ref": "#/definitions/rules"
    }
  },
  "title": "syntax",
  "type": "object"
}