Skip to content

Commit

Permalink
Add source.powershell.embedded for subexpressions
Browse files Browse the repository at this point in the history
  • Loading branch information
jwortmann authored and michaelblyons committed May 10, 2022
1 parent abca63f commit 3179654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions PowerShell.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,7 @@ contexts:
push:
- clear_scopes: 1
- meta_scope: meta.interpolation.powershell
- meta_content_scope: source.powershell.embedded
- match: \)
scope: punctuation.section.interpolation.end.powershell
pop: true
Expand Down
4 changes: 3 additions & 1 deletion Tests/syntax_test_PowerShell.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,8 @@ get-thing | Out-WithYou > $null # destroy
# ^^ constant.character.escape
# ^^^^^^^^^^^^^^^^^^^ - constant
"When you call a method: $( get-number | %{ invoke-command $( [string]::format("Like (this{0})","what?") ) $var } )"
# ^^ punctuation.section.interpolation.begin
# ^^ punctuation.section.interpolation.begin - source.powershell.embedded
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ source.powershell.embedded
# ^ keyword.operator.logical.pipe
# ^ meta.group.complex.subexpression punctuation.section.group.begin
# ^^^^^^ storage.type
Expand All @@ -1443,6 +1444,7 @@ get-thing | Out-WithYou > $null # destroy
# ^ meta.group.complex.subexpression punctuation.section.arguments.end
# ^ meta.group.complex.subexpression punctuation.section.group.end
# ^ punctuation.definition.variable
# ^ punctuation.section.interpolation.end - source.powershell.embedded
"This is the DebugPreference variable: $DebugPreference"
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ meta.string string.quoted.double
# ^^^^^^^^^^^^^^^^ meta.string meta.interpolation variable.language - string
Expand Down

0 comments on commit 3179654

Please sign in to comment.