File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -480,11 +480,11 @@ contexts:
480480# ##[ VARIABLES ]###############################################################
481481
482482 variables :
483- - match : (?=[$@](?:[{$^]|{{identifier_simple}}))
483+ - match : ' {{var_lookahead}} '
484484 push : [members, expect-variable]
485485
486486 variables-without-members :
487- - match : (?=[$@](?:[{$^]|{{identifier_simple}}))
487+ - match : ' {{var_lookahead}} '
488488 push : [expect-variable]
489489
490490 expect-variable :
@@ -501,7 +501,7 @@ contexts:
501501 1 : punctuation.definition.variable.powershell
502502 2 : punctuation.section.interpolation.begin.powershell
503503 push : inside-variable-special-char
504- - match : (\$|@)(?!\{)
504+ - match : (\$|@)
505505 captures :
506506 1 : punctuation.definition.variable.powershell
507507 2 : punctuation.section.interpolation.begin.powershell
@@ -1064,6 +1064,11 @@ variables:
10641064 identifier_simple : ' [\p{L}\p{Nd}_?]+'
10651065 identifier_special : ' [^}]*[^}`]'
10661066 identifier_function : ' [\p{L}\p{Nd}_.-]+'
1067+ var_lookahead : |-
1068+ (?x: (?=
1069+ \$[$^{]
1070+ | [$@]{{identifier_simple}}
1071+ ))
10671072 # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables
10681073 var_constants : |-
10691074 \b(?xi:
You can’t perform that action at this time.
0 commit comments