function names that start with colon have weird behavior with first non label compatible character #8908
Labels
Issue-Question
ideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a
Resolution-No Activity
Issue has had no activity for 6 months or more
WG-Language
parser, language semantics
Steps to reproduce
Note the different requirements:
Expected behavior
All to be consistent.
Actual behavior
It seems that some rules for labels are being applied to functions who's name token directly start with a colon, as the rules seem to match, such that any character that would fail as a label character just gets consumed in to the name with no regard to the rules of that character, such as the double-quote in the first statement above, or the backtick in the 4th statement.
I noticed this while trying to correct the PowerShell/EditorSyntax for function names, see PowerShell/EditorSyntax#156 for my work. I've noticed that a label can also be a function, and that is difficult to properly detect in a TM grammar, so I was double checking some of my matches when I noticed this, and at first thought I had the rules to function names wrong.
Environment data
Tested on 5.1 Windows PowerShell and 6.2 preview
The text was updated successfully, but these errors were encountered: