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

breaking syntax highlighting in switch #6

Open
burrbull opened this issue Mar 12, 2023 · 1 comment
Open

breaking syntax highlighting in switch #6

burrbull opened this issue Mar 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@burrbull
Copy link

If switch branch contents several values syntax highlighting breaks after | and restores after next one.

switch val {
                128 | 256 => 64,
                384 | 512 => 96,
            }
@schungx schungx added the bug Something isn't working label Mar 12, 2023
@schungx
Copy link
Contributor

schungx commented Mar 12, 2023

Hhhmmm.... seems that an even number of items doesn't allow it to recover. An odd number of items can be recovered.

And a simple expression x | y with two terms also doesn't work, so this must be a particular issue with the | operator.

It is likely to be a conflict with the | x, y | ... closure syntax...

As I'm not really an expert in writing syntax highlighting expressions... I'm not sure how this can be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants