File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,14 @@ contexts:
5858
5959 - match : \B\.(?= )
6060 scope : keyword.operator.source.powershell
61+ push :
62+ - include : commands-quoted
63+ - include : else-pop
6164 - match : \&
6265 scope : keyword.operator.call.powershell
66+ push :
67+ - include : commands-quoted
68+ - include : else-pop
6369
6470 - include : expressions
6571
@@ -310,6 +316,22 @@ contexts:
310316 scope : meta.function-call.powershell variable.function.powershell
311317 push : in-command
312318
319+ commands-quoted :
320+ - match : (?={{single_quote}})
321+ push : [in-command, expect-single-quoted-command]
322+ - match : (?={{double_quote}})
323+ push : [in-command, expect-double-quoted-command]
324+
325+ expect-single-quoted-command :
326+ - meta_scope : meta.function-call.powershell variable.function.powershell
327+ - include : single-quoted-strings
328+ - include : immediately-pop
329+
330+ expect-double-quoted-command :
331+ - meta_scope : meta.function-call.powershell variable.function.powershell
332+ - include : double-quoted-strings
333+ - include : immediately-pop
334+
313335 command-freeform :
314336 - match : ' {{identifier_simple}}'
315337 scope : meta.function-call.powershell variable.function.powershell
Original file line number Diff line number Diff line change @@ -922,6 +922,13 @@ $a3[1..2]
922922# ^^^^^^^^^^ meta.function-call.powershell variable.function.powershell
923923# @@@@@@@@@@ reference
924924
925+ & " .\script name with spaces.ps1"
926+ # ^ keyword.operator.call.powershell
927+ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.function-call.powershell variable.function.powershell meta.string.interpolated.powershell string.quoted.double.powershell
928+ # ^ punctuation.definition.string.begin.powershell
929+ # ^ punctuation.definition.string.end.powershell
930+ # @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ reference
931+
925932# switch
926933switch (" fourteen" ) {}
927934# <- keyword.control
You can’t perform that action at this time.
0 commit comments