diff --git a/PowerShellSyntax.tmLanguage b/PowerShellSyntax.tmLanguage index 60dd69d..e076e51 100644 --- a/PowerShellSyntax.tmLanguage +++ b/PowerShellSyntax.tmLanguage @@ -258,7 +258,7 @@ match - (?<!\w|-|\.)((?i:begin|break|catch|continue|data|default|define|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\?)(?!\w) + (?<!\w|-|\.)((?i:begin|break|catch|continue|data|default|define|dispose|do|dynamicparam|else|elseif|end|exit|finally|for|from|if|in|inlinescript|parallel|param|process|return|sequence|switch|throw|trap|try|until|var|while)|%|\?)(?!\w) name keyword.control.powershell diff --git a/examples/advancedFunction.ps1 b/examples/advancedFunction.ps1 index 1862e9b..21f9334 100644 --- a/examples/advancedFunction.ps1 +++ b/examples/advancedFunction.ps1 @@ -90,4 +90,7 @@ function Verb-Noun End { } + Dispose + { + } } diff --git a/spec/testfiles/syntax_test_Function.ps1 b/spec/testfiles/syntax_test_Function.ps1 index 187dab1..6d06471 100644 --- a/spec/testfiles/syntax_test_Function.ps1 +++ b/spec/testfiles/syntax_test_Function.ps1 @@ -370,4 +370,8 @@ function Verb-Noun { # <- keyword.control.powershell } + Dispose{ + # <- keyword.control.powershell + } + }