-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Committee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Languageparser, language semanticsparser, language semantics
Description
Summary of the new feature/enhancement
In PowerShell ISE and with PSReadLine, the default clause condition keyword of the switch statement receives only 'bareword' treatment, making it hard to spot relative to other bareword conditions.
(PowerShell 7 with custom PSReadLine theme)

(Example shown here with PowerShell/EditorSyntax#156 (which marks the bareword conditions as unquoted strings) and a custom theme in VS Code, with the keyword highlighted)
Proposed technical implementation details (optional)
I would propose a change to Parser.GetCommandArgument() that would mark the token as a keyword when it meets the criteria for being the default clause condition keyword.
I can include a commit to PR #10295 that demonstrates this change.
Metadata
Metadata
Assignees
Labels
Committee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.WG-Languageparser, language semanticsparser, language semantics

