diff --git a/PowerShellSyntax.tmLanguage b/PowerShellSyntax.tmLanguage index 11bab40..60dd69d 100644 --- a/PowerShellSyntax.tmLanguage +++ b/PowerShellSyntax.tmLanguage @@ -1037,7 +1037,7 @@ comment Style preference variables as language variables so that they stand out. match - (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b + (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))((?:\.(?:\p{L}|\d|_)+)*\b)?\b captures @@ -1321,7 +1321,7 @@ comment Style preference variables as language variables so that they stand out. match - (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|ProgressPreference|PsCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|VerbosePreference|WarningPreference|WhatIfPreference))\b + (\$)(?i:(ConfirmPreference|DebugPreference|ErrorActionPreference|ErrorView|FormatEnumerationLimit|InformationPreference|LogCommandHealthEvent|LogCommandLifecycleEvent|LogEngineHealthEvent|LogEngineLifecycleEvent|LogProviderHealthEvent|LogProviderLifecycleEvent|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount|MaximumHistoryCount|MaximumVariableCount|OFS|OutputEncoding|PSCulture|PSDebugContext|PSDefaultParameterValues|PSEmailServer|PSItem|PSModuleAutoLoadingPreference|PSModuleAutoloadingPreference|PSSenderInfo|PSSessionApplicationName|PSSessionConfigurationName|PSSessionOption|ProgressPreference|VerbosePreference|WarningPreference|WhatIfPreference))\b captures diff --git a/spec/testfiles/syntax_test_TheBigTestFile.ps1 b/spec/testfiles/syntax_test_TheBigTestFile.ps1 index 83a1a43..73bb888 100644 --- a/spec/testfiles/syntax_test_TheBigTestFile.ps1 +++ b/spec/testfiles/syntax_test_TheBigTestFile.ps1 @@ -1222,3 +1222,12 @@ get-thing | Out-WithYou > $null # destroy # ^ ^ meta.group.complex.subexpression.powershell punctuation.section.group.begin.powershell # ^ storage.type.powershell # ^ ^ meta.group.complex.subexpression.powershell punctuation.section.group.end.powershell +"This is the Debugreference variable: $DebugPreference" +# <- string.quoted.double.powershell +# ^ variable.language.powershell + +$ConfirmPreference $DebugPreference $ErrorActionPreference $ErrorView $FormatEnumerationLimit $InformationPreference $LogCommandHealthEvent $LogCommandLifecycleEvent $LogEngineHealthEvent $LogEngineLifecycleEvent $LogProviderHealthEvent $LogProviderLifecycleEvent $MaximumAliasCount $MaximumDriveCount $MaximumErrorCount $MaximumFunctionCount $MaximumHistoryCount $MaximumVariableCount $OFS $OutputEncoding $PSCulture $PSDebugContext $PSDefaultParameterValues $PSEmailServer $PSItem $PSModuleAutoLoadingPreference $PSModuleAutoloadingPreference $PSSenderInfo $PSSessionApplicationName $PSSessionConfigurationName $PSSessionOption $ProgressPreference $VerbosePreference $WarningPreference $WhatIfPreference +# <- variable.language.powershell +# ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell +# ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell +# ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell ^ variable.language.powershell \ No newline at end of file