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

Syntax highlighting flaws #595

Open
tomx-sh opened this issue Sep 1, 2024 · 1 comment
Open

Syntax highlighting flaws #595

tomx-sh opened this issue Sep 1, 2024 · 1 comment
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working

Comments

@tomx-sh
Copy link

tomx-sh commented Sep 1, 2024

Hi,
Solidity syntax highlighting seems a bit flawed on VSCode. Using cmd+shift+P>Developer: Inspect Editor Tokens and Scopes, you can verify that:

  • some ) characters are not recognized as punctuation.parameters.end (some are)
  • some , characters are not recognized as punctuation.separator (some are)
  • in >=, the = character is not recognized as part of the keyword.operator.logic. (It is recognized as keyword.operator.assignment instead).

The following image illustrates this using my custom theme:
solidity_synt

If you give me some quick directives, I may be able to help fixing this (my experience with ANTLR V4 lexer and parser systems might come useful). I'd be happy to!

@kanej kanej added type:bug Something isn't working status:ready This issue is ready to be worked on and removed status:triaging labels Sep 2, 2024
@kanej
Copy link
Member

kanej commented Sep 2, 2024

Those are great catches, thanks!

The syntax highlighting in vscode is handled by its own built-in system based on textmate grammars. You can find the file here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants