Skip to content

Commit 3179654

Browse files
jwortmannmichaelblyons
authored andcommitted
Add source.powershell.embedded for subexpressions
1 parent abca63f commit 3179654

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

PowerShell.sublime-syntax

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ contexts:
524524
push:
525525
- clear_scopes: 1
526526
- meta_scope: meta.interpolation.powershell
527+
- meta_content_scope: source.powershell.embedded
527528
- match: \)
528529
scope: punctuation.section.interpolation.end.powershell
529530
pop: true

Tests/syntax_test_PowerShell.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1432,7 +1432,8 @@ get-thing | Out-WithYou > $null # destroy
14321432
# ^^ constant.character.escape
14331433
# ^^^^^^^^^^^^^^^^^^^ - constant
14341434
"When you call a method: $( get-number | %{ invoke-command $( [string]::format("Like (this{0})","what?") ) $var } )"
1435-
# ^^ punctuation.section.interpolation.begin
1435+
# ^^ punctuation.section.interpolation.begin - source.powershell.embedded
1436+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.powershell.embedded
14361437
# ^ keyword.operator.logical.pipe
14371438
# ^ meta.group.complex.subexpression punctuation.section.group.begin
14381439
# ^^^^^^ storage.type
@@ -1443,6 +1444,7 @@ get-thing | Out-WithYou > $null # destroy
14431444
# ^ meta.group.complex.subexpression punctuation.section.arguments.end
14441445
# ^ meta.group.complex.subexpression punctuation.section.group.end
14451446
# ^ punctuation.definition.variable
1447+
# ^ punctuation.section.interpolation.end - source.powershell.embedded
14461448
"This is the DebugPreference variable: $DebugPreference"
14471449
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string string.quoted.double
14481450
# ^^^^^^^^^^^^^^^^ meta.string meta.interpolation variable.language - string

0 commit comments

Comments
 (0)