Skip to content

syntax coloring is unexpected #17

Open
@medovina

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions