Skip to content

Commit a273d95

Browse files
committed
rescope variable sigil per PowerShell#23
1 parent 05e1f59 commit a273d95

File tree

4 files changed

+112
-112
lines changed

4 files changed

+112
-112
lines changed

PowerShellSyntax.tmLanguage

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
<key>1</key>
221221
<dict>
222222
<key>name</key>
223-
<string>keyword.other.variable.definition.powershell</string>
223+
<string>punctuation.definition.variable.powershell</string>
224224
</dict>
225225
<key>2</key>
226226
<dict>
@@ -760,7 +760,7 @@
760760
<key>1</key>
761761
<dict>
762762
<key>name</key>
763-
<string>keyword.other.variable.definition.powershell</string>
763+
<string>punctuation.definition.variable.powershell</string>
764764
</dict>
765765
<key>2</key>
766766
<dict>
@@ -1004,7 +1004,7 @@
10041004
<key>1</key>
10051005
<dict>
10061006
<key>name</key>
1007-
<string>keyword.other.variable.definition.powershell</string>
1007+
<string>punctuation.definition.variable.powershell</string>
10081008
</dict>
10091009
</dict>
10101010
<key>comment</key>
@@ -1023,7 +1023,7 @@
10231023
<key>1</key>
10241024
<dict>
10251025
<key>name</key>
1026-
<string>keyword.other.variable.definition.powershell</string>
1026+
<string>punctuation.definition.variable.powershell</string>
10271027
</dict>
10281028
<key>3</key>
10291029
<dict>
@@ -1047,7 +1047,7 @@
10471047
<key>1</key>
10481048
<dict>
10491049
<key>name</key>
1050-
<string>keyword.other.variable.definition.powershell</string>
1050+
<string>punctuation.definition.variable.powershell</string>
10511051
</dict>
10521052
<key>3</key>
10531053
<dict>
@@ -1071,7 +1071,7 @@
10711071
<key>1</key>
10721072
<dict>
10731073
<key>name</key>
1074-
<string>keyword.other.variable.definition.powershell</string>
1074+
<string>punctuation.definition.variable.powershell</string>
10751075
</dict>
10761076
<key>3</key>
10771077
<dict>
@@ -1095,7 +1095,7 @@
10951095
<key>1</key>
10961096
<dict>
10971097
<key>name</key>
1098-
<string>keyword.other.variable.definition.powershell</string>
1098+
<string>punctuation.definition.variable.powershell</string>
10991099
</dict>
11001100
<key>2</key>
11011101
<dict>
@@ -1122,7 +1122,7 @@
11221122
<key>1</key>
11231123
<dict>
11241124
<key>name</key>
1125-
<string>keyword.other.variable.definition.powershell</string>
1125+
<string>punctuation.definition.variable.powershell</string>
11261126
</dict>
11271127
<key>2</key>
11281128
<dict>
@@ -1159,7 +1159,7 @@
11591159
<key>1</key>
11601160
<dict>
11611161
<key>name</key>
1162-
<string>keyword.other.variable.definition.powershell</string>
1162+
<string>punctuation.definition.variable.powershell</string>
11631163
</dict>
11641164
<key>2</key>
11651165
<dict>
@@ -1186,7 +1186,7 @@
11861186
<key>1</key>
11871187
<dict>
11881188
<key>name</key>
1189-
<string>keyword.other.variable.definition.powershell</string>
1189+
<string>punctuation.definition.variable.powershell</string>
11901190
</dict>
11911191
<key>2</key>
11921192
<dict>
@@ -1288,7 +1288,7 @@
12881288
<key>1</key>
12891289
<dict>
12901290
<key>name</key>
1291-
<string>keyword.other.variable.definition.powershell</string>
1291+
<string>punctuation.definition.variable.powershell</string>
12921292
</dict>
12931293
</dict>
12941294
<key>comment</key>
@@ -1307,7 +1307,7 @@
13071307
<key>1</key>
13081308
<dict>
13091309
<key>name</key>
1310-
<string>keyword.other.variable.definition.powershell</string>
1310+
<string>punctuation.definition.variable.powershell</string>
13111311
</dict>
13121312
<key>3</key>
13131313
<dict>
@@ -1331,7 +1331,7 @@
13311331
<key>1</key>
13321332
<dict>
13331333
<key>name</key>
1334-
<string>keyword.other.variable.definition.powershell</string>
1334+
<string>punctuation.definition.variable.powershell</string>
13351335
</dict>
13361336
<key>3</key>
13371337
<dict>
@@ -1355,7 +1355,7 @@
13551355
<key>1</key>
13561356
<dict>
13571357
<key>name</key>
1358-
<string>keyword.other.variable.definition.powershell</string>
1358+
<string>punctuation.definition.variable.powershell</string>
13591359
</dict>
13601360
<key>3</key>
13611361
<dict>
@@ -1379,7 +1379,7 @@
13791379
<key>1</key>
13801380
<dict>
13811381
<key>name</key>
1382-
<string>keyword.other.variable.definition.powershell</string>
1382+
<string>punctuation.definition.variable.powershell</string>
13831383
</dict>
13841384
<key>2</key>
13851385
<dict>
@@ -1406,7 +1406,7 @@
14061406
<key>1</key>
14071407
<dict>
14081408
<key>name</key>
1409-
<string>keyword.other.variable.definition.powershell</string>
1409+
<string>punctuation.definition.variable.powershell</string>
14101410
</dict>
14111411
<key>2</key>
14121412
<dict>
@@ -1438,7 +1438,7 @@
14381438
<key>1</key>
14391439
<dict>
14401440
<key>name</key>
1441-
<string>keyword.other.variable.definition.powershell</string>
1441+
<string>punctuation.definition.variable.powershell</string>
14421442
</dict>
14431443
<key>2</key>
14441444
<dict>
@@ -1465,7 +1465,7 @@
14651465
<key>1</key>
14661466
<dict>
14671467
<key>name</key>
1468-
<string>keyword.other.variable.definition.powershell</string>
1468+
<string>punctuation.definition.variable.powershell</string>
14691469
</dict>
14701470
<key>2</key>
14711471
<dict>

spec/testfiles/syntax_test_Class.ps1

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class TypeName
2525
# <- punctuation.section.bracket.begin.powershell
2626
# ^ storage.type.powershell
2727
# ^ punctuation.section.bracket.end.powershell
28-
# ^ keyword.other.variable.definition.powershell
28+
# ^ punctuation.definition.variable.powershell
2929
# ^^ variable.other.readwrite.powershell
3030

3131
# Static property
@@ -36,7 +36,7 @@ class TypeName
3636
# ^ punctuation.section.bracket.begin.powershell
3737
# ^ storage.type.powershell
3838
# ^ punctuation.section.bracket.end.powershell
39-
# ^ keyword.other.variable.definition.powershell
39+
# ^ punctuation.definition.variable.powershell
4040
# ^^ variable.other.readwrite.powershell
4141

4242
# Hidden property does not show as result of Get-Member
@@ -47,7 +47,7 @@ class TypeName
4747
# ^ punctuation.section.bracket.begin.powershell
4848
# ^ storage.type.powershell
4949
# ^ punctuation.section.bracket.end.powershell
50-
# ^ keyword.other.variable.definition.powershell
50+
# ^ punctuation.definition.variable.powershell
5151
# ^^ variable.other.readwrite.powershell
5252

5353
# Constructor
@@ -58,15 +58,15 @@ class TypeName
5858
# ^ punctuation.section.bracket.begin.powershell
5959
# ^^^^^^ storage.type.powershell
6060
# ^ punctuation.section.bracket.end.powershell
61-
# ^ keyword.other.variable.definition.powershell
61+
# ^ punctuation.definition.variable.powershell
6262
# ^ variable.other.readwrite.powershell
6363
# ^ punctuation.section.group.end.powershell
6464
$this.P1 = $s
65-
# <- keyword.other.variable.definition.powershell
65+
# <- punctuation.definition.variable.powershell
6666
# ^ support.constant.automatic.powershell
6767
# ^^ variable.other.member.powershell
6868
# ^ keyword.operator.assignment.powershell
69-
# ^ keyword.other.variable.definition.powershell
69+
# ^ punctuation.definition.variable.powershell
7070
# ^ variable.other.readwrite.powershell
7171
}
7272

@@ -82,15 +82,15 @@ class TypeName
8282
# ^ punctuation.section.bracket.begin.powershell
8383
# ^^^^^^^^^ storage.type.powershell
8484
# ^ punctuation.section.bracket.end.powershell
85-
# ^ keyword.other.variable.definition.powershell
85+
# ^ punctuation.definition.variable.powershell
8686
# ^ variable.other.readwrite.powershell
8787
# ^ punctuation.section.group.end.powershell
8888
[TypeName]::P2 = $h
8989
# <- punctuation.section.bracket.begin.powershell
9090
# ^ storage.type.powershell
9191
# ^ punctuation.section.bracket.end.powershell
9292
# ^ keyword.operator.assignment.powershell
93-
# ^ keyword.other.variable.definition.powershell
93+
# ^ punctuation.definition.variable.powershell
9494
# ^ variable.other.readwrite.powershell
9595
}
9696

@@ -105,19 +105,19 @@ class TypeName
105105
# ^ punctuation.section.bracket.begin.powershell
106106
# ^^^ storage.type.powershell
107107
# ^ punctuation.section.bracket.end.powershell
108-
# ^ keyword.other.variable.definition.powershell
108+
# ^ punctuation.definition.variable.powershell
109109
# ^ variable.other.readwrite.powershell
110110
# ^ punctuation.section.group.end.powershell
111111
$this.P3 = $i
112-
# <- keyword.other.variable.definition.powershell
112+
# <- punctuation.definition.variable.powershell
113113
# ^ support.constant.automatic.powershell
114114
# ^^ variable.other.member.powershell
115115
# ^ keyword.operator.assignment.powershell
116-
# ^ keyword.other.variable.definition.powershell
116+
# ^ punctuation.definition.variable.powershell
117117
# ^ variable.other.readwrite.powershell
118118
return $this.P3
119119
# <- keyword.control.powershell
120-
# ^ keyword.other.variable.definition.powershell
120+
# ^ punctuation.definition.variable.powershell
121121
# ^^^^ support.constant.automatic.powershell
122122
# ^^ variable.other.member.powershell
123123
}

spec/testfiles/syntax_test_Function.ps1

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ function Verb-Noun {
6161
SupportsShouldProcess = $true,
6262
# ^^^^^^^^^^^^^^^^^^^^^ meta.attribute.powershell variable.parameter.attribute.powershell
6363
# ^ meta.attribute.powershell keyword.operator.assignment.powershell
64-
# ^ meta.attribute.powershell keyword.other.variable.definition.powershell
64+
# ^ meta.attribute.powershell punctuation.definition.variable.powershell
6565
# ^^^^ meta.attribute.powershell constant.language.powershell
6666
PositionalBinding = $false,
6767
# ^^^^^^^^^^^^^^^^^ meta.attribute.powershell variable.parameter.attribute.powershell
6868
# ^ meta.attribute.powershell keyword.operator.assignment.powershell
69-
# ^ meta.attribute.powershell keyword.other.variable.definition.powershell
69+
# ^ meta.attribute.powershell punctuation.definition.variable.powershell
7070
# ^^^^^ meta.attribute.powershell constant.language.powershell
7171
HelpUri = 'http://www.microsoft.com/',
7272
# ^^^^^^^ meta.attribute.powershell variable.parameter.attribute.powershell
@@ -106,25 +106,25 @@ function Verb-Noun {
106106
# ^ meta.attribute.powershell punctuation.section.group.begin.powershell
107107
# ^^^^^^^^^ meta.attribute.powershell variable.parameter.attribute.powershell
108108
# ^ meta.attribute.powershell keyword.operator.assignment.powershell
109-
# ^ meta.attribute.powershell keyword.other.variable.definition.powershell
109+
# ^ meta.attribute.powershell punctuation.definition.variable.powershell
110110
# ^^^^ meta.attribute.powershell constant.language.powershell
111111
# ^ meta.attribute.powershell keyword.operator.other.powershell
112112
ValueFromPipeline=$true,
113113
# ^^^^^^^^^^^^^^^^^ meta.attribute.powershell variable.parameter.attribute.powershell
114114
# ^ meta.attribute.powershell keyword.operator.assignment.powershell
115-
# ^ meta.attribute.powershell keyword.other.variable.definition.powershell
115+
# ^ meta.attribute.powershell punctuation.definition.variable.powershell
116116
# ^^^^ meta.attribute.powershell constant.language.powershell
117117
# ^ meta.attribute.powershell keyword.operator.other.powershell
118118
ValueFromPipelineByPropertyName = $true,
119119
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute.powershell variable.parameter.attribute.powershell
120120
# ^ meta.attribute.powershell keyword.operator.assignment.powershell
121-
# ^ meta.attribute.powershell keyword.other.variable.definition.powershell
121+
# ^ meta.attribute.powershell punctuation.definition.variable.powershell
122122
# ^^^^ meta.attribute.powershell constant.language.powershell
123123
# ^ meta.attribute.powershell keyword.operator.other.powershell
124124
ValueFromRemainingArguments=$false,
125125
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.attribute.powershell variable.parameter.attribute.powershell
126126
# ^ meta.attribute.powershell keyword.operator.assignment.powershell
127-
# ^ meta.attribute.powershell keyword.other.variable.definition.powershell
127+
# ^ meta.attribute.powershell punctuation.definition.variable.powershell
128128
# ^^^^^ meta.attribute.powershell constant.language.powershell
129129
# ^ meta.attribute.powershell keyword.operator.other.powershell
130130
Position=0,
@@ -184,7 +184,7 @@ function Verb-Noun {
184184
# ^ meta.attribute.powershell punctuation.section.group.end.powershell
185185
# ^ meta.attribute.powershell punctuation.section.bracket.end.powershell
186186
$Param1,
187-
# <- keyword.other.variable.definition.powershell
187+
# <- punctuation.definition.variable.powershell
188188
# ^ variable.other.readwrite.powershell
189189
# ^ keyword.operator.other.powershell
190190

@@ -223,7 +223,7 @@ function Verb-Noun {
223223
# ^ meta.attribute.powershell support.function.attribute.powershell
224224
# ^ meta.attribute.powershell punctuation.section.group.begin.powershell
225225
# ^ meta.scriptblock.powershell meta.attribute.powershell
226-
# ^ meta.attribute.powershell keyword.other.variable.definition.powershell
226+
# ^ meta.attribute.powershell punctuation.definition.variable.powershell
227227
# ^^^^ meta.scriptblock.powershell constant.language.powershell
228228
# ^ meta.scriptblock.powershell meta.attribute.powershell
229229
# ^ meta.attribute.powershell punctuation.section.group.end.powershell
@@ -242,7 +242,7 @@ function Verb-Noun {
242242
# ^ storage.type.powershell
243243
# ^ punctuation.section.bracket.end.powershell
244244
$Param2,
245-
# <- keyword.other.variable.definition.powershell
245+
# <- punctuation.definition.variable.powershell
246246
# ^ variable.other.readwrite.powershell
247247
# ^ keyword.operator.other.powershell
248248

@@ -279,7 +279,7 @@ function Verb-Noun {
279279
# ^ storage.type.powershell
280280
# ^ punctuation.section.bracket.end.powershell
281281
$Param3,
282-
# <- keyword.other.variable.definition.powershell
282+
# <- punctuation.definition.variable.powershell
283283
# ^ variable.other.readwrite.powershell
284284
# ^ keyword.operator.other.powershell
285285

@@ -301,7 +301,7 @@ function Verb-Noun {
301301
# ^ meta.attribute.powershell punctuation.section.group.begin.powershell
302302
# ^ meta.attribute.powershell meta.scriptblock.powershell
303303
# ^^^^^^^^^ meta.scriptblock.powershell support.function.powershell
304-
# ^ meta.scriptblock.powershell keyword.other.variable.definition.powershell
304+
# ^ meta.scriptblock.powershell punctuation.definition.variable.powershell
305305
# ^ meta.scriptblock.powershell support.constant.automatic.powershell
306306
# ^ meta.attribute.powershell meta.scriptblock.powershell
307307
# ^ meta.attribute.powershell punctuation.section.group.end.powershell
@@ -311,7 +311,7 @@ function Verb-Noun {
311311
# ^ storage.type.powershell
312312
# ^ punctuation.section.bracket.end.powershell
313313
$Param4,
314-
# <- keyword.other.variable.definition.powershell
314+
# <- punctuation.definition.variable.powershell
315315
# ^ variable.other.readwrite.powershell
316316
# ^ keyword.operator.other.powershell
317317

@@ -341,7 +341,7 @@ function Verb-Noun {
341341
# ^ storage.type.powershell
342342
# ^ punctuation.section.bracket.end.powershell
343343
$Param5
344-
# <- keyword.other.variable.definition.powershell
344+
# <- punctuation.definition.variable.powershell
345345
# ^ variable.other.readwrite.powershell
346346
)
347347
# <- punctuation.section.group.end.powershell
@@ -355,7 +355,7 @@ function Verb-Noun {
355355
if ($pscmdlet.ShouldProcess("Target", "Operation")) {
356356
# <- keyword.control.powershell
357357
# ^ punctuation.section.group.begin.powershell
358-
# ^ keyword.other.variable.definition.powershell
358+
# ^ punctuation.definition.variable.powershell
359359
# ^^^^^^^^ support.constant.automatic.powershell
360360
# ^^^^^^^^^^^^^ variable.other.member.powershell
361361
# ^ punctuation.section.group.begin.powershell

0 commit comments

Comments
 (0)