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

TextMate grammar for python doesn't correctly handle match statement followed by ~ token #4753

Open
erictraut opened this issue Aug 24, 2023 · 1 comment

Comments

@erictraut
Copy link
Contributor

I realize that the TextMate grammar for Python ships with VS Code and the code is in the MagicPython repo, but I'm filing this here because the Pylance team is tracking a few other TextMate grammar issues.

The grammar apparently doesn't handle the case where a match (soft) keyword is followed by a ~ token.

match ~1:
    case _:
        pass

Note how it works correctly for other unary operators.

image

@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Aug 24, 2023
@bschnurr bschnurr removed their assignment Jan 4, 2024
@debonte
Copy link
Contributor

debonte commented Mar 1, 2024

Repros on 2024.2.105. Note that semantic highlighting covers up this issue. You can see the coloring that Eric showed above by setting "editor.semanticHighlighting.enabled": false

@debonte debonte added textmate bug and removed needs repro Issue has not been reproduced yet labels Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants