You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Label in front of Foreach, For, and While loop keyword is not highlighted #89
Kris Borowinski (@kborowinski), PR #156 demonstrates handling of label, but I made up a scope to assign to it, so without some support in the theme, it will still appear unhandled.
Anyone have any recommendations for scope for a label? I used 'entity.name.label.powershell' for both definition and use.
A caution: Labels also can be valid function names. TextMate is not sophisticated enough to handle all the possible situations that can arise, so PR #156 is confined to consider any construct that might be a valid label, as a label, if its the only thing that appears on the rest of the statement line. TextMate cannot make scoping decisions spanning more than one line; all decisions must be final at the end of the line.
FYI, in the code shown, the label is probably unneeded, as is the FOREACH loop, as SWITCH automatically performs expansion of a collection (but the result variable will be $_). Also, you might be interested to know, that quotes are not needed around the test value in SWITCH statements, when they are a simple word. The 'Subject' and 'Body' can be Subject and Body.
Activity
omniomi commentedon May 8, 2018
Looks like the loop constructs are also not defined. Currently it's inheriting from:
Which is for obvious reasons not ideal. Will work something out tonight :)
msftrncs commentedon Apr 27, 2019
Kris Borowinski (@kborowinski), PR #156 demonstrates handling of label, but I made up a scope to assign to it, so without some support in the theme, it will still appear unhandled.
Anyone have any recommendations for scope for a label? I used 'entity.name.label.powershell' for both definition and use.
A caution: Labels also can be valid function names. TextMate is not sophisticated enough to handle all the possible situations that can arise, so PR #156 is confined to consider any construct that might be a valid label, as a label, if its the only thing that appears on the rest of the statement line. TextMate cannot make scoping decisions spanning more than one line; all decisions must be final at the end of the line.
FYI, in the code shown, the label is probably unneeded, as is the FOREACH loop, as SWITCH automatically performs expansion of a collection (but the result variable will be
$_). Also, you might be interested to know, that quotes are not needed around the test value in SWITCH statements, when they are a simple word. The'Subject'and'Body'can beSubjectandBody.