-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version v2021.5.1 Semantic Textmate Scope is incorrect for negative numeric literals, when used as a parameter #207
Comments
@rjmholt I'm unclear, is this a semantic highlighting issue, or an editor syntax grammar issue? |
@andschwa It looks like
|
Technically negative numeric constants as an argument are considered unquoted text by the PS tokenizer (as indicated by PSReadLine highlighting). So the TextMate scope is wrong. But the sematic highlighter is no better, as 'function' is definitely not the right scope. Neither of these things are what the OP wants to hear. This is a very important demonstration. Echo -0006 outputs
but echo (-0006) outputs
|
Actually, I give a bad example with 'echo' ( echo 0006 results in
This provides a more meaningful demonstration: (echo 0006).GetType().Name
(echo -0006).GetType().Name
(echo (-0006)).GetType().Name which results in
|
"editor.semanticHighlighting.enabled": true
is onSystem Details
System Details (Click to Expand)
System Details Output
Issue Description
The Textmate scopes or token is wrong on negative numeric literals
Working behavior
Non-parameters, and positive numbers are okay
Expected Behaviour
To share similar tokens/scopes
To reproduce
It seems to occur when:
Code used:
Actual Behavior
The text was updated successfully, but these errors were encountered: