@@ -129,13 +129,13 @@ contexts:
129
129
- match : \b{{month}}\b
130
130
scope : constant.numeric.integer.decimal.crontab
131
131
- include : illegal-numbers
132
- - match : \b ({{words_month}})(-)({{words_month}})\b
132
+ - match : ({{words_month}})(-)({{words_month}})
133
133
scope : constant.other.range.crontab
134
134
captures :
135
135
1 : support.constant.month-name.crontab
136
136
2 : punctuation.separator.sequence.crontab
137
137
3 : support.constant.month-name.crontab
138
- - match : \b {{words_month}}\b
138
+ - match : ' {{words_month}}'
139
139
scope : support.constant.month-name.crontab
140
140
- match : (?=[ \t])
141
141
set : cron-day-of-week-is-next
@@ -158,18 +158,18 @@ contexts:
158
158
scope : constant.other.range.crontab
159
159
captures :
160
160
1 : punctuation.separator.sequence.crontab
161
- - match : \b ({{day_of_week}})(L)?\b
161
+ - match : ({{day_of_week}})(L)?\b
162
162
captures :
163
163
1 : constant.numeric.integer.decimal.crontab
164
164
2 : invalid.deprecated.non-standard.crontab
165
165
- include : illegal-numbers
166
- - match : \b ({{words_day_of_week}})(-)({{words_day_of_week}})\b
166
+ - match : ({{words_day_of_week}})(-)({{words_day_of_week}})
167
167
scope : constant.other.range.crontab
168
168
captures :
169
169
1 : support.constant.day-of-week-name.crontab
170
170
2 : punctuation.separator.sequence.crontab
171
171
3 : support.constant.day-of-week-name.crontab
172
- - match : \b {{words_day_of_week}}\b
172
+ - match : ' {{words_day_of_week}}'
173
173
scope : support.constant.day-of-week-name.crontab
174
174
- match : \?|#
175
175
scope : invalid.deprecated.non-standard.crontab
@@ -193,18 +193,18 @@ contexts:
193
193
scope : constant.character.newline.crontab
194
194
195
195
at-syntax :
196
- # Keyword, then script embed
197
- - match : ^\s*((@){{keywords}}) [ \t]+
196
+ # Every X seconds
197
+ - match : ^\s*(@)(\d+)(?= [ \t])
198
198
captures :
199
- 1 : constant.language.schedule.crontab
200
- 2 : punctuation.definition.variable.crontab
201
- embed : scope:source.shell.bash.crontab
202
- escape : (?=$)
203
- # Don't unhighlight keywords just because EOL
204
- - match : ^\s*((@){{keywords}})\b
199
+ 1 : punctuation.definition.variable.crontab
200
+ 2 : meta.number.integer.decimal.crontab constant.numeric.value.crontab
201
+ set : command-is-next
202
+ # Keyword, then script embed
203
+ - match : ^\s*((@){{keywords}})(?=[ \t])
205
204
captures :
206
205
1 : constant.language.schedule.crontab
207
206
2 : punctuation.definition.variable.crontab
207
+ set : command-is-next
208
208
# Set up autocomplete for keywords
209
209
- match : ^\s*(@)(\w*(?:[\n\s]|$))
210
210
captures :
@@ -288,18 +288,11 @@ variables:
288
288
day_of_month : (?:[1-9]|[1-2]\d|3[01]) # 1-31
289
289
month : (?:[1-9]|1[0-2]) # 1-12
290
290
day_of_week : (?:[0-7]) # 0-7
291
- words_month : (?i:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)
292
- words_day_of_week : (?i:Sun|Mon|Tue|Wed|Thu|Fri|Sat)
293
- keywords : (?:reboot|yearly|annually|monthly|weekly|daily|midnight|hourly)
294
- snippet_typing : |-
295
- (?x:
296
- c(?:r(?:o(?:n)?)?)?
297
- | r(?:e(?:b(?:o(?:o(?:t)?)?)?)?)?
298
- | y(?:e(?:a(?:r(?:l(?:y)?)?)?)?)?
299
- | a(?:n(?:n(?:u(?:a(?:l(?:l(?:y)?)?)?)?)?)?)?
300
- | m(?:o(?:n(?:t(?:h(?:l(?:y)?)?)?)?)?)?
301
- | w(?:e(?:e(?:k(?:l(?:y)?)?)?)?)?
302
- | d(?:a(?:i(?:l(?:y)?)?)?)?
303
- | m(?:i(?:d(?:n(?:i(?:g(?:h(?:t)?)?)?)?)?)?)?
304
- | h(?:o(?:u(?:r(?:l(?:y)?)?)?)?)?
305
- )
291
+ words_month : \b(?i:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\b
292
+ words_day_of_week : \b(?i:Sun|Mon|Tue|Wed|Thu|Fri|Sat)\b
293
+ keywords : |-
294
+ \b(?x:
295
+ reboot | yearly | annually | monthly | weekly | daily | hourly
296
+ # BSD extras
297
+ | midnight | every_minute | every_second
298
+ )\b
0 commit comments