Skip to content

Commit a2cdb2a

Browse files
committed
Test string subexpression property access
1 parent 00937cd commit a2cdb2a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Tests/syntax_test_strings.ps1

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,22 @@
122122
# ^^ string.quoted.double.powershell - meta.interpolation
123123
# ^ punctuation.definition.string.end.powershell
124124

125+
# When used in a subexpression, still don't extend past its closing
126+
"This is my $($variable.Name).Name!"
127+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.interpolated.powershell
128+
# ^^^^^^^^^^^^ string.quoted.double.powershell
129+
# ^ punctuation.definition.string.begin.powershell
130+
# ^^^^^^^^^^^^^^^^^ meta.interpolation.powershell
131+
# ^^ punctuation.section.interpolation.begin.powershell
132+
# ^^^^^^^^^^^^^^ source.powershell.embedded
133+
# ^^^^^^^^^ variable.other.readwrite.powershell
134+
# ^ punctuation.definition.variable.powershell
135+
# ^ punctuation.accessor.dot.powershell
136+
# ^^^^ variable.other.member.powershell
137+
# ^ punctuation.section.interpolation.end.powershell
138+
# ^^^^^^^ string.quoted.double.powershell
139+
# ^ punctuation.definition.string.end.powershell
140+
125141
# $ENV:ComputerName should be highlighted
126142
"This is the name of my computer: $ENV:ComputerName"
127143
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string.interpolated.powershell

0 commit comments

Comments
 (0)