@@ -1012,112 +1012,6 @@ contexts:
1012
1012
- include : zsh-modifier-end-ahead
1013
1013
- include : zsh-glob-qualifier-content
1014
1014
1015
- # ##[ ZSH GLOB RANGES ]#########################################################
1016
-
1017
- zsh-group-glob-ranges :
1018
- # This context consumes glob ranges (e.g.: `<1-20>`) in groups or sequences
1019
- # or scopes `<` invalid illegal otherwise without popping owning context.
1020
- - match : (?=<)
1021
- branch_point : zsh-group-glob-range
1022
- branch :
1023
- - zsh-group-glob-range-begin
1024
- - zsh-group-glob-range-fallback
1025
-
1026
- zsh-group-glob-range-begin :
1027
- - clear_scopes : 1 # clear `string.unquoted`
1028
- - meta_include_prototype : false
1029
- - match : \<
1030
- scope : punctuation.definition.range.begin.shell.zsh
1031
- push :
1032
- - zsh-group-glob-range-end
1033
- - zsh-glob-range-number
1034
- - zsh-group-glob-range-operator
1035
- - zsh-glob-range-number
1036
-
1037
- zsh-group-glob-range-end :
1038
- - meta_include_prototype : false
1039
- - meta_scope : meta.range.shell.zsh
1040
- - match : \>
1041
- scope : punctuation.definition.range.end.shell.zsh
1042
- pop : 2
1043
- - include : zsh-group-glob-range-fail
1044
-
1045
- zsh-group-glob-range-fail :
1046
- - include : line-continuations
1047
- - match : ' '
1048
- fail : zsh-group-glob-range
1049
-
1050
- zsh-group-glob-range-fallback :
1051
- - meta_include_prototype : false
1052
- - match : \<+
1053
- scope : invalid.illegal.unexpected-token.shell.zsh
1054
- pop : 1
1055
-
1056
- zsh-group-glob-range-operator :
1057
- # range operator is crucial
1058
- - meta_include_prototype : false
1059
- - include : zsh-glob-range-operator
1060
- - include : zsh-group-glob-range-fail
1061
-
1062
- zsh-string-glob-ranges :
1063
- # This context consumes glob ranges (e.g.: `<1-20>`)
1064
- # within top-level patterns or strings
1065
- # or pops owning context off stack to consume input redirection.
1066
- - match : (?=<)
1067
- branch_point : zsh-string-glob-range
1068
- branch :
1069
- - zsh-string-glob-range-begin
1070
- - zsh-string-glob-range-fallback
1071
-
1072
- zsh-string-glob-range-begin :
1073
- - clear_scopes : 1 # clear `string.unquoted`
1074
- - meta_include_prototype : false
1075
- - match : \<
1076
- scope : punctuation.definition.range.begin.shell.zsh
1077
- push :
1078
- - zsh-string-glob-range-end
1079
- - zsh-glob-range-number
1080
- - zsh-string-glob-range-operator
1081
- - zsh-glob-range-number
1082
-
1083
- zsh-string-glob-range-end :
1084
- - meta_include_prototype : false
1085
- - meta_scope : meta.range.shell.zsh
1086
- - match : \>
1087
- scope : punctuation.definition.range.end.shell.zsh
1088
- pop : 2
1089
- - include : zsh-string-glob-range-fail
1090
-
1091
- zsh-string-glob-range-fail :
1092
- - include : line-continuations
1093
- - match : ' '
1094
- fail : zsh-string-glob-range
1095
-
1096
- zsh-string-glob-range-fallback :
1097
- # also pop parent context off stack
1098
- - meta_include_prototype : false
1099
- - match : ' '
1100
- pop : 2
1101
-
1102
- zsh-string-glob-range-operator :
1103
- # range operator is crucial
1104
- - meta_include_prototype : false
1105
- - include : zsh-glob-range-operator
1106
- - include : zsh-string-glob-range-fail
1107
-
1108
- zsh-glob-range-number :
1109
- # range numbers are optional
1110
- - meta_include_prototype : false
1111
- - match : (?=[\d$])
1112
- set : dec-number-body
1113
- - include : line-continuations
1114
- - include : immediately-pop
1115
-
1116
- zsh-glob-range-operator :
1117
- - match : \-
1118
- scope : keyword.operator.range.shell.zsh
1119
- pop : 1
1120
-
1121
1015
# ##[ ZSH GLOB QUALIFIERS ]#####################################################
1122
1016
1123
1017
zsh-glob-qualifier :
@@ -1232,6 +1126,112 @@ contexts:
1232
1126
1 : keyword.operator.arithmetic.shell
1233
1127
2 : constant.numeric.value.shell
1234
1128
1129
+ # ##[ ZSH GLOB RANGES ]#########################################################
1130
+
1131
+ zsh-group-glob-ranges :
1132
+ # This context consumes glob ranges (e.g.: `<1-20>`) in groups or sequences
1133
+ # or scopes `<` invalid illegal otherwise without popping owning context.
1134
+ - match : (?=<)
1135
+ branch_point : zsh-group-glob-range
1136
+ branch :
1137
+ - zsh-group-glob-range-begin
1138
+ - zsh-group-glob-range-fallback
1139
+
1140
+ zsh-group-glob-range-begin :
1141
+ - clear_scopes : 1 # clear `string.unquoted`
1142
+ - meta_include_prototype : false
1143
+ - match : \<
1144
+ scope : punctuation.definition.range.begin.shell.zsh
1145
+ push :
1146
+ - zsh-group-glob-range-end
1147
+ - zsh-glob-range-number
1148
+ - zsh-group-glob-range-operator
1149
+ - zsh-glob-range-number
1150
+
1151
+ zsh-group-glob-range-end :
1152
+ - meta_include_prototype : false
1153
+ - meta_scope : meta.range.shell.zsh
1154
+ - match : \>
1155
+ scope : punctuation.definition.range.end.shell.zsh
1156
+ pop : 2
1157
+ - include : zsh-group-glob-range-fail
1158
+
1159
+ zsh-group-glob-range-fail :
1160
+ - include : line-continuations
1161
+ - match : ' '
1162
+ fail : zsh-group-glob-range
1163
+
1164
+ zsh-group-glob-range-fallback :
1165
+ - meta_include_prototype : false
1166
+ - match : \<+
1167
+ scope : invalid.illegal.unexpected-token.shell.zsh
1168
+ pop : 1
1169
+
1170
+ zsh-group-glob-range-operator :
1171
+ # range operator is crucial
1172
+ - meta_include_prototype : false
1173
+ - include : zsh-glob-range-operator
1174
+ - include : zsh-group-glob-range-fail
1175
+
1176
+ zsh-string-glob-ranges :
1177
+ # This context consumes glob ranges (e.g.: `<1-20>`)
1178
+ # within top-level patterns or strings
1179
+ # or pops owning context off stack to consume input redirection.
1180
+ - match : (?=<)
1181
+ branch_point : zsh-string-glob-range
1182
+ branch :
1183
+ - zsh-string-glob-range-begin
1184
+ - zsh-string-glob-range-fallback
1185
+
1186
+ zsh-string-glob-range-begin :
1187
+ - clear_scopes : 1 # clear `string.unquoted`
1188
+ - meta_include_prototype : false
1189
+ - match : \<
1190
+ scope : punctuation.definition.range.begin.shell.zsh
1191
+ push :
1192
+ - zsh-string-glob-range-end
1193
+ - zsh-glob-range-number
1194
+ - zsh-string-glob-range-operator
1195
+ - zsh-glob-range-number
1196
+
1197
+ zsh-string-glob-range-end :
1198
+ - meta_include_prototype : false
1199
+ - meta_scope : meta.range.shell.zsh
1200
+ - match : \>
1201
+ scope : punctuation.definition.range.end.shell.zsh
1202
+ pop : 2
1203
+ - include : zsh-string-glob-range-fail
1204
+
1205
+ zsh-string-glob-range-fail :
1206
+ - include : line-continuations
1207
+ - match : ' '
1208
+ fail : zsh-string-glob-range
1209
+
1210
+ zsh-string-glob-range-fallback :
1211
+ # also pop parent context off stack
1212
+ - meta_include_prototype : false
1213
+ - match : ' '
1214
+ pop : 2
1215
+
1216
+ zsh-string-glob-range-operator :
1217
+ # range operator is crucial
1218
+ - meta_include_prototype : false
1219
+ - include : zsh-glob-range-operator
1220
+ - include : zsh-string-glob-range-fail
1221
+
1222
+ zsh-glob-range-number :
1223
+ # range numbers are optional
1224
+ - meta_include_prototype : false
1225
+ - match : (?=[\d$])
1226
+ set : dec-number-body
1227
+ - include : line-continuations
1228
+ - include : immediately-pop
1229
+
1230
+ zsh-glob-range-operator :
1231
+ - match : \-
1232
+ scope : keyword.operator.range.shell.zsh
1233
+ pop : 1
1234
+
1235
1235
# ##[ ZSH MODIFIERS ]###########################################################
1236
1236
1237
1237
zsh-modifier-end :
0 commit comments