Skip to content
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

Getting invalid.illegal.name.python on valid python code from textmate #150199

Closed
Bobronium opened this issue May 23, 2022 · 2 comments
Closed

Getting invalid.illegal.name.python on valid python code from textmate #150199

Bobronium opened this issue May 23, 2022 · 2 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@Bobronium
Copy link

Bobronium commented May 23, 2022

Issue Type: Bug

in 42and 2, a valid python code, 42and is marked as invalid.illegal.name.python
image

42 should be marked as constant.numeric.dec.python and and should be marked as keyword.control.flow.python.

Additional info: semantic token highlighting is enabled and working as expected.

PyCharm is able to parse it correctly:
image

Output from inspector:

language	python
standard token type	Other
foreground	#BC3F3C
background	#2B2B2B
contrast ratio	2.64
textmate scopes	invalid.illegal.name.python
meta.function-call.arguments.python
meta.function-call.python
source.python

VS Code version: Code 1.67.2 (Universal) (c3511e6, 2022-05-17T18:20:57.384Z)
OS version: Darwin arm64 21.5.0
Restricted Mode: No

@karthiknadig
Copy link
Member

Since this is coming from textmate, moving this to VS Code.

@karthiknadig karthiknadig transferred this issue from microsoft/vscode-python May 23, 2022
@karthiknadig karthiknadig changed the title Getting invalid.illegal.name.python on valid python code Getting invalid.illegal.name.python on valid python code from textmate May 23, 2022
@aeschli aeschli assigned alexr00 and unassigned aeschli Jun 8, 2022
@alexr00
Copy link
Member

alexr00 commented Jun 8, 2022

I can also repro this. Moved to the repository that we get our python syntax highlighting grammar from: MagicStack/MagicPython#252

@alexr00 alexr00 closed this as completed Jun 8, 2022
@alexr00 alexr00 added upstream Issue identified as 'upstream' component related (exists outside of VS Code) grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream labels Jun 8, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

5 participants