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 coloring is unexpected #17

Open
medovina opened this issue Feb 25, 2024 · 1 comment
Open

syntax coloring is unexpected #17

medovina opened this issue Feb 25, 2024 · 1 comment

Comments

@medovina
Copy link

I like the functionality of this extension a lot. However, it chooses syntax colors that aren't what I would expect.

  • I would expect strings in an EBNF specification to appear in the same color as constant strings in code, e.g. in a Python program. In my Visual Studio theme (Light Modern), this is red. But with this extension strings appear black.

  • This extension colors a non-terminal that's being defined (on the left side of '=') in the same color that Visual Studio uses for keywords in programming languages. In the Light Modern theme this is blue. That seems wrong to me, since a non-terminal is not a keyword. In my opinion, a non-terminal that's being defined should have the same color as a non-terminal that's being used (on the right side of '='). By analogy, if I write Python code such as

def foo(x):
   return bar(x)

then VS Code displays 'foo' and 'bar' in the same color, even though 'foo' is a function that's being defined and 'bar' is a function that's being called. Simply put, they are both the same kind of thing, i.e. a function, so I think they should have the same color.

I know that these colors are a matter of opinion, so if you disagree you can simply close this. But I thought I would at least bring this up.

@medovina
Copy link
Author

Now that I've used the extension a bit more, I think that having a different color on the left side of the '=' is not so bad, so maybe my second point above is not so important. I still think it would be nicer if strings were colored consistently with source files containing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant