@@ -134,8 +134,30 @@ variables:
134134 )
135135 deprecated_settings : |-
136136 (?x: windows-powershell )
137- recipe_attributes : |-
138- (?x: linux | macos | no-cd | no-exit-message | private | unix | windows )
137+ recipe_attributes_bare : |-
138+ (?x:
139+ confirm
140+ | linux
141+ | macos
142+ | no-cd
143+ | no-exit-message
144+ | no-quiet
145+ | openbsd
146+ | positional-arguments
147+ | private
148+ | script
149+ | unix
150+ | windows
151+ )
152+ recipe_attributes_arguments : |-
153+ (?x:
154+ confirm
155+ | doc
156+ | extension
157+ | group
158+ | script
159+ | working-directory
160+ )
139161
140162# ##############################################################################
141163# MAIN CONTEXT
@@ -195,7 +217,7 @@ contexts:
195217 - include : operators
196218 - include : function-calls
197219 - include : if-statements
198- - include : strings
220+ - include : all- strings
199221 - include : operands-variables
200222
201223
@@ -290,11 +312,17 @@ contexts:
290312
291313# ##[ CHARACTERS ]##############################################################
292314
293- strings :
315+ all-strings :
316+ - include : quoted-strings
317+ - include : backtick-strings
318+
319+ quoted-strings :
294320 - include : single-quote-block-strings
295321 - include : single-quote-strings
296322 - include : double-quote-block-strings
297323 - include : double-quote-strings
324+
325+ backtick-strings :
298326 - include : backtick-quote-block-strings
299327 - include : backtick-quote-strings
300328
@@ -419,14 +447,31 @@ contexts:
419447 - include : eol-pop
420448
421449 expect-recipe-attribute-name :
422- - match : ({{recipe_attributes}})
450+ - match : ({{recipe_attributes_arguments}})
451+ scope : variable.annotation.just
452+ set : recipe-attribute-argument
453+ - match : ({{recipe_attributes_bare}})
423454 scope : variable.annotation.just
424455 pop : 1
425456 - match : \]
426457 scope : invalid.illegal.just
458+ comment : If properly handled, this frame will be popped before the \] is encountered
427459 pop : 2
428460 - include : else-pop
429461
462+ recipe-attribute-argument :
463+ - match : \(
464+ scope : punctuation.definition.annotation.begin.just
465+ set : recipe-attribute-argument-body
466+ - include : else-pop
467+
468+ recipe-attribute-argument-body :
469+ - meta_scope : meta.string.just
470+ - match : \)
471+ scope : punctuation.definition.annotation.end.just
472+ pop : 1
473+ - include : quoted-strings
474+
430475 recipe-definition :
431476 - match : (?=^@?{{valid_name}}(?![^:]*:=)) # Matches '^recipeName' but not '^varName :='
432477 push :
@@ -685,7 +730,7 @@ contexts:
685730 pop : 1
686731 - match : ' ,'
687732 scope : punctuation.separator.parameters.just
688- - include : strings
733+ - include : all- strings
689734 - include : eol-pop # ??
690735
691736 settings-string-name :
@@ -696,7 +741,7 @@ contexts:
696741 - assignment-operator
697742
698743 settings-string-value :
699- - include : strings
744+ - include : all- strings
700745 - include : eol-pop
701746
702747# ###[ General Types ]##########################################################
0 commit comments