From 9b21f086caa203c16962766cb9cb257542668d5d Mon Sep 17 00:00:00 2001 From: matteocoder <22897138+matteocoder@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:42:45 +0100 Subject: [PATCH] Add 'clean' block keyword to PowerShell.sublime-syntax This commit also adds tests for the new syntax. --- PowerShell.sublime-syntax | 2 ++ Tests/syntax_test_PowerShell.ps1 | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/PowerShell.sublime-syntax b/PowerShell.sublime-syntax index db3f9477..1d1e363c 100644 --- a/PowerShell.sublime-syntax +++ b/PowerShell.sublime-syntax @@ -102,6 +102,8 @@ contexts: scope: keyword.context.block.begin.powershell - match: \b(?i:end){{kebab_break}} scope: keyword.context.block.end.powershell + - match: \b(?i:clean){{kebab_break}} + scope: keyword.context.block.clean.powershell # Loops - match: \b(?i:for|foreach(?!-object)){{kebab_break}} scope: keyword.control.loop.for.powershell diff --git a/Tests/syntax_test_PowerShell.ps1 b/Tests/syntax_test_PowerShell.ps1 index db08a459..f1380ee7 100644 --- a/Tests/syntax_test_PowerShell.ps1 +++ b/Tests/syntax_test_PowerShell.ps1 @@ -1131,6 +1131,10 @@ catch { } # <- keyword.control # ^ punctuation.section.braces.begin # ^ punctuation.section.braces.end +clean { } +# <- keyword.context.block.clean +# ^ punctuation.section.braces.begin +# ^ punctuation.section.braces.end # Reserved words Configuration Crazyness {