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

Problem with syntax highlighting on char literals #190

Open
JaScMiller opened this issue Oct 27, 2022 · 3 comments
Open

Problem with syntax highlighting on char literals #190

JaScMiller opened this issue Oct 27, 2022 · 3 comments
Labels
UI bug Something isn't working in the VSCode UI
Milestone

Comments

@JaScMiller
Copy link

JaScMiller commented Oct 27, 2022

Character literals seem to break subsequent syntax highlighting (see picture 1).

Sometimes it seems to fix itself later, I have not been able to discern how/why (see picture 2).

I tried switching themes but it seems to be a case on each.

image

image

@JaScMiller
Copy link
Author

JaScMiller commented Oct 27, 2022

Ah, it is the use of a double quotes within a single quote, escaping the double quote does fix the single quote highlighting, but then creates a new issue:

image

image

@nickbattle
Copy link
Collaborator

Ah yes, you can imagine the colouring rules are confused by quotes within quotes. Thanks for reporting this. We'll take a look at the highlighting rules. In the meantime, if it's too annoying, I think you can achieve the same effect using a unicode character code - y = '\u0022'.

@nickbattle nickbattle added the UI bug Something isn't working in the VSCode UI label Dec 10, 2022
@MarkusEllyton MarkusEllyton added this to the v1.4.0 milestone Mar 10, 2024
@nickbattle
Copy link
Collaborator

@MarkusEllyton Note that this seems to still be broken for single quotes appearing in variable names. See email.

functions
    name' : nat -> nat   <--- the quote here carries brown across until the next line!
    name'(a) == a + 1;

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

No branches or pull requests

3 participants