Skip to content

Commit 361ad86

Browse files
committed
Rescope the variable scope colon
1 parent 82f5288 commit 361ad86

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

PowerShell.sublime-syntax

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -622,11 +622,11 @@ contexts:
622622
- match: ({{var_scope_mod}})(:)
623623
captures:
624624
1: storage.modifier.scope.powershell
625-
2: punctuation.separator.sequence.powershell
625+
2: punctuation.accessor.colon.powershell
626626
- match: ({{identifier_simple}})(:)
627627
captures:
628628
1: support.variable.drive.powershell
629-
2: punctuation.separator.sequence.powershell
629+
2: punctuation.accessor.colon.powershell
630630
- match: '{{identifier_simple}}'
631631
- include: immediately-pop
632632

@@ -641,11 +641,11 @@ contexts:
641641
- match: ({{var_scope_mod}})(:)
642642
captures:
643643
1: storage.modifier.scope.powershell
644-
2: punctuation.separator.sequence.powershell
644+
2: punctuation.accessor.colon.powershell
645645
- match: ({{identifier_simple}})(:)
646646
captures:
647647
1: support.variable.drive.powershell
648-
2: punctuation.separator.sequence.powershell
648+
2: punctuation.accessor.colon.powershell
649649

650650
members:
651651
- match: (?=\.\.)

Tests/syntax_test_PowerShell.ps1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,13 @@ throw "Do not run this file!"
177177
# ^^^^^^^^^^^^^^^^ variable.other.readwrite.powershell
178178
# ^ punctuation.definition.variable.powershell
179179
# ^^^^^^ storage.modifier.scope.powershell
180-
# ^ punctuation.separator.sequence.powershell
180+
# ^ punctuation.accessor.colon.powershell
181181
$ENV:ComputerName
182182
# ^^^^^^^^^^^^^^^^^ variable.other.readwrite.powershell
183183
# ^ punctuation.definition.variable.powershell
184184
# ^^^ support.variable.drive.powershell
185-
# ^ punctuation.separator.sequence.powershell
185+
# ^ punctuation.accessor.colon.powershell
186+
# ^^^^^^^^^^^^^^^^^ variable.other.readwrite.powershell
186187
${variable}
187188
# ^^^^^^^^^^^ variable.other.readwrite.powershell
188189
# ^ punctuation.definition.variable.powershell
@@ -210,7 +211,7 @@ throw "Do not run this file!"
210211
# ^ punctuation.definition.variable.powershell
211212
# ^ punctuation.section.interpolation.begin.powershell
212213
# ^^^^^^ storage.modifier.scope.powershell
213-
# ^ punctuation.separator.sequence.powershell
214+
# ^ punctuation.accessor.colon.powershell
214215
# ^ punctuation.section.interpolation.end.powershell
215216

216217

@@ -1605,7 +1606,7 @@ $file = join-path $env:SystemDrive "$([System.io.path]::GetRandomFileName()).ps1
16051606
# ^^^^^^^^^^^^^^^^ variable.other.readwrite.powershell
16061607
# ^ punctuation.definition.variable.powershell
16071608
# ^^^ support.variable.drive.powershell
1608-
# ^ punctuation.separator.sequence.powershell
1609+
# ^ punctuation.accessor.colon.powershell
16091610
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.interpolated.powershell
16101611
# ^ string.quoted.double.powershell punctuation.definition.string.begin.powershell
16111612
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.interpolation.powershell

Tests/syntax_test_strings.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
# ^^^^^^^^^^^^^^^^^ meta.interpolation.powershell variable.other.readwrite.powershell
131131
# ^ punctuation.definition.variable.powershell
132132
# ^^^ support.variable.drive.powershell
133-
# ^ punctuation.separator.sequence.powershell
133+
# ^ punctuation.accessor.colon.powershell
134134
# ^ string.quoted.double.powershell punctuation.definition.string.end.powershell
135135

136136
# Here as well
@@ -142,7 +142,7 @@
142142
# ^ punctuation.definition.variable.powershell
143143
# ^ punctuation.section.interpolation.begin.powershell
144144
# ^^^ support.variable.drive.powershell
145-
# ^ punctuation.separator.sequence.powershell
145+
# ^ punctuation.accessor.colon.powershell
146146
# ^ punctuation.section.interpolation.end.powershell
147147
# ^ string.quoted.double.powershell punctuation.definition.string.end.powershell
148148

0 commit comments

Comments
 (0)