PrestonKnopp / language-gdscript

gdscript language grammar package for atom.io
https://atom.io/packages/lang-gdscript
MIT License
32 stars 9 forks source link

Variable and function coloring is off #1

Closed cart closed 8 years ago

cart commented 8 years ago

Variables and functions are yellow rather than white (using the default One Dark theme). Additionally variable declarations show up in red.

Here is a gdscript snippet: screenshot from 2015-12-09 21-49-10

Compare that to this C# snippet: screenshot from 2015-12-09 21-49-32

The C# coloring follows the "standard" atom color scheme.

PrestonKnopp commented 8 years ago

Hi, thanks for posting an issue! The grammar is definitely in real need of a good refactoring and enhancement. I'll take a look at it tomorrow and see what I can do.

PrestonKnopp commented 8 years ago

How do these look to you?

Overview of Highlighting highlight-overview

Highlighted Snippets highlight-snippets

cart commented 8 years ago

Much better! Thanks for the quick response!

cart commented 8 years ago

Actually I do have one critique. With the new grammar, function declarations and function calls are both colored blue. These are conceptually different things and they are generally not colored the same (function calls are usually the same color as variables. white in this case). Similarly, class declarations and class references are both colored yellow. The class references should also probably be white.

PrestonKnopp commented 8 years ago

Yeah, I agree, the function calls should be white. For classes, it follows js and java, where constructors are highlighted as well. I personally prefer that. However, for static use and built-in non .new constructible types like Vector will be white. Does that sound alright?

cart commented 8 years ago

Yeah that sounds good. Thanks again!

PrestonKnopp commented 8 years ago

Sweet, you're welcome and thanks for your input!