Revert "syntax: Remove empty rules in regions"

This reverts commit a9b513a28a.
This commit is contained in:
Jöran Karl
2025-08-31 13:47:53 +02:00
parent b8057f28c6
commit 0277516eef
69 changed files with 138 additions and 0 deletions

View File

@@ -19,4 +19,5 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -30,6 +30,7 @@ rules:
- preproc:
start: "\\$(\\{|ENV\\{)"
end: "\\}"
rules: []
- identifier.macro: "\\b(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\\b"

View File

@@ -27,10 +27,12 @@ rules:
- constant.string:
start: "`"
end: "`"
rules: []
- constant.string:
start: "%x\\{"
end: "\\}"
rules: []
- constant.string:
start: "\""
@@ -66,4 +68,5 @@ rules:
- constant:
start: "<<-?'?EOT'?"
end: "^EOT"
rules: []

File diff suppressed because one or more lines are too long

View File

@@ -109,10 +109,13 @@ rules:
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []
- comment:
start: "/\\+"
end: "\\+/"
rules: []

View File

@@ -19,6 +19,7 @@ rules:
- default:
start: "<%"
end: "%>"
rules: []
- preproc: "<%|%>"
- red: "&[^;[[:space:]]]*;"
@@ -36,5 +37,6 @@ rules:
- identifier.macro:
start: "<<-?'?EOT'?"
end: "^EOT"
rules: []
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"

View File

@@ -22,6 +22,7 @@ rules:
start: "'"
end: "'"
skip: "\\\\."
rules: []
# - constant.specialChar: "%."
# - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
# - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
@@ -41,3 +42,4 @@ rules:
- comment:
start: "%"
end: "$"
rules: []

View File

@@ -38,6 +38,7 @@ rules:
start: "'"
end: "'"
skip: "\\\\."
rules: []
- comment:
start: "#"

View File

@@ -19,6 +19,7 @@ rules:
- constant.string:
start: "\\b([Ss.]\" )"
end: "\""
rules: []
- comment:
start: "\\("

View File

@@ -45,3 +45,4 @@ rules:
- comment:
start: "\\(\\*"
end: "\\*\\)"
rules: []

View File

@@ -10,6 +10,7 @@ rules:
- special:
start: "^```"
end: "^```"
rules: []
# heading lines
- special: "^#{1,3}.*"
# unordered list items

View File

@@ -20,3 +20,4 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -22,6 +22,7 @@ rules:
- comment.line:
start: "^#"
end: "$"
rules: []
# Diffs (i.e. git commit --verbose)
- default:

View File

@@ -11,3 +11,4 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -16,3 +16,4 @@ rules:
- comment.line:
start: "^#"
end: "$"
rules: []

View File

@@ -47,6 +47,7 @@ rules:
- constant.string:
start: "`"
end: "`"
rules: []
- comment:
start: "//"

View File

@@ -44,3 +44,4 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -11,6 +11,7 @@ rules:
- constant:
start: "(\\\\|\\\\\\\\)n\\["
end: "]"
rules: []
- type: "^\\.[[:space:]]*[^[[:space:]]]*"
- comment: "^\\.\\\\\".*$"
@@ -18,10 +19,12 @@ rules:
- constant.string:
start: "(\\\\|\\\\\\\\)\\*\\["
end: "]"
rules: []
- constant.specialChar: "\\\\\\(.."
- constant.specialChar:
start: "\\\\\\["
end: "]"
rules: []
- identifier.macro: "\\\\\\\\\\$[1-9]"

View File

@@ -75,6 +75,7 @@ rules:
- identifier:
start: "[$][{]"
end: "[}]"
rules: []
# Triple-single-quoted strings
- constant.string:
@@ -89,6 +90,7 @@ rules:
- constant.string:
start: "[$]/"
end: "/[$]"
rules: []
# Single-line comments
- comment:
@@ -108,3 +110,4 @@ rules:
- comment:
start: "/[*][*]@?"
end: "[*]/"
rules: []

View File

@@ -17,6 +17,7 @@ rules:
- default:
start: ">"
end: "<"
rules: []
- symbol.tag: "<|>"
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"

View File

@@ -17,6 +17,7 @@ rules:
- default:
start: ">"
end: "<"
rules: []
- symbol.tag: "<|>"
- constant.string.url: "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"

View File

@@ -28,8 +28,10 @@ rules:
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []

View File

@@ -16,3 +16,4 @@ rules:
- comment:
start: "{#"
end: "#}"
rules: []

View File

@@ -75,6 +75,7 @@ rules:
start: "\\|\\|\\| *$"
end: "^ *\\|\\|\\|"
rules: []
# multi-line comment
- comment:

View File

@@ -30,6 +30,7 @@ rules:
- constant.string:
start: "\"\"\""
end: "\"\"\""
rules: []
- constant.string:
start: "\""
@@ -43,11 +44,14 @@ rules:
- constant.string:
start: "'\""
end: "'"
rules: []
- comment:
start: "#="
end: "=#"
rules: []
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -37,3 +37,4 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -23,4 +23,5 @@ rules:
- comment:
start: "^!"
end: "$"
rules: []

View File

@@ -54,11 +54,14 @@ rules:
start: "\""
end: "(\"|$)"
skip: "\\\\."
rules: []
- constant.string:
start: "'"
end: "('|$)"
skip: "\\\\."
rules: []
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -18,7 +18,9 @@ rules:
- comment:
start: "%\\{"
end: "%\\}"
rules: []
- comment:
start: "%"
end: "$"
rules: []

View File

@@ -83,6 +83,7 @@ rules:
- constant.string.url:
start: "https?://"
end: "\\s"
rules: []
# path
# - constant.string.url: "\\b(.+)/([^/]+)\\b" # linux

View File

@@ -45,6 +45,7 @@ rules:
- constant.string:
start: "\\[\\["
end: "\\]\\]"
rules: []
# support first few lengths of "long brackets" explicitly
# brackets longer than that will give false positives
@@ -52,18 +53,22 @@ rules:
- constant.string:
start: "\\[=\\["
end: "\\]=\\]"
rules: []
- constant.string:
start: "\\[==\\["
end: "\\]==\\]"
rules: []
- constant.string:
start: "\\[===\\["
end: "\\]===\\]"
rules: []
- constant.string:
start: "\\[====+\\["
end: "\\]====+\\]"
rules: []
- comment.block:
start: "\\-\\-\\[\\["

View File

@@ -18,6 +18,8 @@ rules:
- default:
start: "^\\n\\n"
end: ".*"
rules: []
- comment:
start: "^>.*"
end: "$"
rules: []

View File

@@ -34,4 +34,5 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -46,3 +46,4 @@ rules:
- special:
start: "`"
end: "`"
rules: []

View File

@@ -11,10 +11,13 @@ rules:
- comment:
start: "#"
end: "$"
rules: []
- comment:
start: "dnl"
end: "$"
rules: []
- constant.string:
start: "`"
end: "'"
rules: []

View File

@@ -15,6 +15,7 @@ rules:
- constant.string:
start: "'$"
end: "';$"
rules: []
- comment: "(^|[[:space:]])#([^{].*)?$"
- indent-char.whitespace: "[[:space:]]+$"

View File

@@ -22,5 +22,6 @@ rules:
- comment:
start: "\\#\\["
end: "\\]\\#"
rules: []
- todo: "(TODO|FIXME|XXX):?"

View File

@@ -14,15 +14,19 @@ rules:
- constant.string:
start: "\""
end: "\""
rules: []
- constant.string:
start: "''"
end: "''"
rules: []
- comment:
start: "#"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []

View File

@@ -94,6 +94,7 @@ rules:
- comment:
start: "#"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"

View File

@@ -40,3 +40,4 @@ rules:
- comment:
start: "\\(\\*"
end: "\\*\\)"
rules: []

View File

@@ -49,6 +49,7 @@ rules:
- constant.string:
start: "`"
end: "`"
rules: []
- comment:
start: "//"

View File

@@ -12,6 +12,7 @@ rules:
- special:
start: "asm"
end: "end"
rules: []
- constant.number: "\\$[0-9A-Fa-f]+"
- constant.number: "\\b[+-]?[0-9]+([.]?[0-9]+)?(?i:e[+-]?[0-9]+)?"
- constant.string:
@@ -28,13 +29,17 @@ rules:
- preproc:
start: "{\\$"
end: "}"
rules: []
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "\\(\\*"
end: "\\*\\)"
rules: []
- comment:
start: "({)(?:[^$])"
end: "}"
rules: []

View File

@@ -28,10 +28,12 @@ rules:
start: "'"
end: "'"
skip: "\\\\'"
rules: []
- comment:
start: "#"
end: "$"
rules: []
- constant.string: "\"\\(.*\\)\"|qq?\\|.*\\||qq?\\{.*\\}|qq?\\/.*\\/"
- constant.number: "\\b([0-9]*[.])?[0-9]+"
@@ -43,11 +45,14 @@ rules:
- preproc:
start: "(^use| = new)"
end: ";"
rules: []
- comment:
start: "^="
end: "^=cut"
rules: []
- identifier.macro:
start: "<< 'STOP'"
end: "STOP"
rules: []

View File

@@ -40,9 +40,11 @@ rules:
- comment:
start: "(^|[[:space:]])*(//|#)"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []
- constant.string:
start: "\""

View File

@@ -26,10 +26,12 @@ rules:
- comment:
start: "\"\"\"[^\"]*"
end: "\"\"\""
rules: []
- comment: "(^|[[:space:]])//.*"
- comment:
start: "/\\*"
end: "\\*/"
rules: []
- todo: "TODO:?"

View File

@@ -17,4 +17,5 @@ rules:
- comment:
start: "/\\*"
end: "\\*/"
rules: []

View File

@@ -32,10 +32,12 @@ rules:
- constant.string:
start: "\"\"\""
end: "\"\"\""
rules: []
- constant.string:
start: "'''"
end: "'''"
rules: []
- constant.string:
start: "\""
@@ -54,4 +56,5 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -34,10 +34,12 @@ rules:
- constant.string:
start: "\"\"\""
end: "\"\"\""
rules: []
- constant.string:
start: "'''"
end: "'''"
rules: []
- constant.string:
start: "\""

View File

@@ -29,11 +29,14 @@ rules:
- preproc:
start: "(^use| = new)"
end: ";"
rules: []
- identifier.macro:
start: "<<EOSQL"
end: "EOSQL"
rules: []
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -14,6 +14,7 @@ rules:
- preproc:
start: "^(Source|Patch)"
end: ":"
rules: []
- preproc: "(i386|i486|i586|i686|athlon|ia64|alpha|alphaev5|alphaev56|alphapca56|alphaev6|alphaev67|sparc|sparcv9|sparc64armv3l|armv4b|armv4lm|ips|mipsel|ppc|ppc|iseries|ppcpseries|ppc64|m68k|m68kmint|Sgi|rs6000|i370|s390x|s390|noarch)"
- preproc: "(ifarch|ifnarch|ifos|ifnos)"
@@ -23,10 +24,12 @@ rules:
- statement:
start: "%\\{"
end: "\\}"
rules: []
- statement:
start: "%\\{__"
end: "\\}"
rules: []
- statement: "\\$(RPM_BUILD_ROOT)\\>"
- special: "^%(build$|changelog|check$|clean$|description)"

View File

@@ -34,6 +34,7 @@ rules:
start: "'"
end: "'"
skip: "\\\\."
rules: []
- constant.string:
start: "\""
@@ -66,5 +67,6 @@ rules:
- constant.macro:
start: "<<-?'?EOT'?"
end: "^EOT"
rules: []
- preproc.shebang: "^#!.+?( |$)"

View File

@@ -31,18 +31,22 @@ rules:
- constant.string:
start: "[bc]?r#\""
end: "\"#"
rules: []
- constant.string:
start: "[bc]?r##\""
end: "\"##"
rules: []
- constant.string:
start: "[bc]?r###\""
end: "\"###"
rules: []
- constant.string:
start: "[bc]?r####+\""
end: "\"####+"
rules: []
# Character literals
# NOTE: This is an ugly hack to work around the fact that rust uses
@@ -54,6 +58,7 @@ rules:
- constant.string:
start: "'\""
end: "'"
rules: []
- comment:
start: "//"
@@ -70,3 +75,4 @@ rules:
- special:
start: "#!\\["
end: "\\]"
rules: []

View File

@@ -32,10 +32,12 @@ rules:
- comment:
start: "\"\"\""
end: "\"\"\""
rules: []
- comment:
start: "'''"
end: "'''"
rules: []
- constant.string:
start: "\""
@@ -54,4 +56,5 @@ rules:
- comment:
start: "#"
end: "$"
rules: []

View File

@@ -28,6 +28,7 @@ rules:
- preproc:
start: "^ *(use|include) <"
end: ">;?"
rules: []
- constant.number: "\\b[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?|PI|inf|nan\\b"
- constant.bool: "\\b(true|false)\\b"

View File

@@ -10,6 +10,7 @@ rules:
- constant.string:
start: "\"\"\""
end: "\"\"\""
rules: []
- constant.string:
start: "\""
end: "\""
@@ -20,10 +21,13 @@ rules:
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []
- comment:
start: "/\\*\\*"
end: "\\*/"
rules: []

View File

@@ -48,16 +48,19 @@ rules:
start: "\""
end: "\""
skip: "\\\\."
rules: []
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules: []
- constant.string:
start: "<<[^\\s]+[-~.]*[A-Za-z0-9]+$"
end: "^[^\\s]+[A-Za-z0-9]+$"
skip: "\\\\."
rules: []
- comment:
start: "(^|\\s)#"

View File

@@ -18,6 +18,7 @@ rules:
start: "'"
end: "'"
skip: "\\\\."
rules: []
- constant.string:
start: "\""
@@ -49,5 +50,6 @@ rules:
- constant.macro:
start: "<<-?'?EOT'?"
end: "^EOT"
rules: []
- preproc.shebang: "^#!.+?( |$)"

View File

@@ -20,9 +20,11 @@ rules:
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"
rules: []
- todo: "TODO:?"
- constant.string:
start: "\""

View File

@@ -11,6 +11,7 @@ rules:
- identifier.macro:
start: "`"
end: "'"
rules: []
- identifier.macro: "\\$\\w+"
- constant.specialChar: "\\\\."
@@ -21,6 +22,7 @@ rules:
- identifier.macro:
start: "`"
end: "'"
rules: []
- identifier.macro: "\\$\\w+"
- constant.specialChar: "\\\\."
@@ -44,6 +46,7 @@ rules:
- identifier.macro:
start: "`"
end: "'"
rules: []
- comment:
start: "///?"

View File

@@ -8,9 +8,11 @@ rules:
- identifier:
start: "\\{"
end: "\\}"
rules: []
- identifier:
start: "\\["
end: "\\]"
rules: []
# numbers
- constant.number: "\\b[0-9]+(\\.[0-9]+)?([[:space:]](pt|mm|cm|in|ex|em|bp|pc|dd|cc|nd|nc|sp))?\\b"
# let brackets have the default color again
@@ -23,6 +25,8 @@ rules:
- comment:
start: "[^\\\\]%|^%"
end: "$"
rules: []
- comment:
start: "\\\\begin\\{comment\\}"
end: "\\\\end\\{comment\\}"
rules: []

View File

@@ -27,9 +27,11 @@ rules:
- constant.string:
start: "'''"
end: "'{3,5}"
rules: []
- constant.string:
start: "'"
end: "'"
rules: []
# Integer
- constant.number: '[+-]?(\d+_)*\d+\b'
- constant.number: '(0x([[:xdigit:]]+_)*[[:xdigit:]]+|0o([0-7]_)*[0-7]+|0b([01]+_)*[01]+)'

View File

@@ -52,3 +52,4 @@ rules:
- comment:
start: "\\{#"
end: "#\\}"
rules: []

View File

@@ -23,6 +23,7 @@ rules:
- comment:
start: "//"
end: "$"
rules: []
- comment:
start: "/\\*"
end: "\\*/"

View File

@@ -65,6 +65,7 @@ rules:
- constant.string:
start: "`"
end: "`"
rules: []
- comment:
start: "//"

View File

@@ -19,6 +19,7 @@ rules:
- comment:
start: "/\\*"
end: "\\*/"
rules: []
- todo: "TODO:?"
- indent-char.whitespace: "[[:space:]]+$"

View File

@@ -14,6 +14,7 @@ rules:
- comment:
start: "(^\"|[ \t]+\" |[ \t]+\"$)"
end: "$"
rules: []
- constant.string:
start: "\""

View File

@@ -27,6 +27,7 @@ rules:
- comment.block:
start: "<!\\-\\-"
end: "\\-\\->"
rules: []
# Bootstrap
- symbol.tag.extended: "(?i)<[/]?(b-alert|b-aspect|b-avatar|b-badge|b-icon|b-breadcrumb|b-button-group|b-button-toolbar|b-button|b-calendar|b-card-text|b-card-input|b-card|b-carousel-slide|b-carousel|b-collapse|b-dropdown|b-dropdown-item|b-dropdown-divider|b-embed|b-form-checkbox-group|b-form-checkbox|b-form-datepicker|b-form-file|b-form-group|b-form-input|b-form-radio|b-form-rating|b-form-select|b-form-spinbutton|b-form-tags|b-form-textarea|b-form|b-form-timepicker|b-img-lazy|b-img|b-input-group|b-jumbotron|b-input|b-container|b-row|b-col|b-link|b-list-group|b-list-group-item|b-media|b-modal|b-nav|b-nav-item|b-nav-item-dropdown|b-nav-text|b-nav-form|b-navbar|b-navbar-brand|b-navbar-toggle|b-navbar-nav|b-overlay|b-pagination|b-pagination-nav|b-popover|b-progress|b-progress-bar|b-sidebar|b-skeleton-wrapper|b-skeleton|b-spinner|b-table|b-table-lite|b-table-simple|b-tabs|b-tab|b-time|b-toast|b-tooltip)\\b"

View File

@@ -8,10 +8,12 @@ rules:
- preproc:
start: "<!DOCTYPE"
end: "[/]?>"
rules: []
- comment:
start: "<!--"
end: "-->"
rules: []
- symbol.tag:
start: "<\\??"
@@ -20,6 +22,7 @@ rules:
- identifier:
start: " "
end: "="
rules: []
- constant.string:
start: "\""
end: "\""

View File

@@ -43,8 +43,10 @@ rules:
- constant.string:
start: "'"
end: "'"
rules: []
- comment:
start: "(^|\\s)#"
end: "$"
rules: []