Merge comment types for Ruby to reduce complexities

This commit is contained in:
2025-06-15 13:23:29 -04:00
parent 1c37cba690
commit c7a2ebcedc
+2 -4
View File
@@ -16,17 +16,15 @@ rules:
- constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!" - constant.string: "\"([^\"]|(\\\\\"))*\"|%[QW]?\\{[^}]*\\}|%[QW]?\\([^)]*\\)|%[QW]?<[^>]*>|%[QW]?\\[[^]]*\\]|%[QW]?\\$[^$]*\\$|%[QW]?\\^[^^]*\\^|%[QW]?![^!]*!"
- special: "#\\{[^}]*\\}" - special: "#\\{[^}]*\\}"
- constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!" - constant.string: "'([^']|(\\\\'))*'|%[qw]\\{[^}]*\\}|%[qw]\\([^)]*\\)|%[qw]<[^>]*>|%[qw]\\[[^]]*\\]|%[qw]\\$[^$]*\\$|%[qw]\\^[^^]*\\^|%[qw]![^!]*!"
- comment: "#[^{].*$|#$" - comment: "#+[^{].*$|#$"
- comment: - comment:
start: "=begin" start: "=begin"
end: "=end" end: "=end"
rules: [] rules: []
- comment.bright: "##[^{].*$|##$"
- constant.macro: - constant.macro:
start: "<<-?'?EOT'?" start: "<<-?'?EOT'?"
end: "^EOT" end: "^EOT"
rules: [] rules: []
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)" - todo: "(XXX|TODO|FIXME|\\?\\?\\?)"`)
- preproc.shebang: "^#!.+?( |$)"`)
}} }}
} }