@@ -80,7 +80,6 @@ contexts:
8080 - include : requires-directives
8181
8282 - include : escape-sequences
83- - include : stop-parsing-token
8483
8584 # Normal code
8685 - include : types
@@ -331,18 +330,21 @@ contexts:
331330 in-command :
332331 - meta_content_scope : meta.function-call.arguments.powershell
333332 - include : pop-end-of-command
333+ - include : stop-parsing-token
334334 - include : redirection
335335 - include : cli-parameters
336336 - include : expressions-without-commands
337337 - match : (?=\S)
338- push :
339- - meta_include_prototype : false
340- - meta_scope : string.unquoted.powershell
341- - match : (?=[\s#|>;,]|$)
342- pop : 1
343- - include : path-punctuation
344- - include : escape-sequences
345- - include : string-wildcards
338+ push : inside-unquoted-string
339+
340+ inside-unquoted-string :
341+ - meta_include_prototype : false
342+ - meta_scope : string.unquoted.powershell
343+ - match : (?=[\s#|>;,]|$)
344+ pop : 1
345+ - include : path-punctuation
346+ - include : escape-sequences
347+ - include : string-wildcards
346348
347349 pop-end-of-command :
348350 - include : line-continuations
@@ -381,6 +383,16 @@ contexts:
381383 2 : punctuation.definition.parameter.powershell
382384 3 : keyword.operator.assignment.powershell
383385
386+ stop-parsing-token :
387+ - match : \B--%\B
388+ scope : keyword.control.stop-parsing.powershell
389+ set :
390+ - meta_include_prototype : false
391+ - meta_scope : meta.function-call.arguments.powershell
392+ - meta_content_scope : string.unquoted.powershell
393+ - include : pop-before-eol
394+ - include : pop-pipe
395+
384396# ##[ DIRECTIVES ]##############################################################
385397
386398 requires-directives :
@@ -1279,14 +1291,6 @@ contexts:
12791291
12801292# ##[ COMPONENTS ]##############################################################
12811293
1282- stop-parsing-token :
1283- - match : \B--%\B
1284- scope : keyword.control.powershell
1285- push :
1286- - meta_include_prototype : false
1287- - meta_content_scope : string.unquoted.powershell
1288- - include : pop-before-eol
1289-
12901294 path-punctuation :
12911295 - match : ' :(?=[\\/])'
12921296 scope : punctuation.separator.path.powershell
0 commit comments