As I’ve been expanding upon my Hugo syntax highlighter for ConTEXT, I’ve run into a dilemma in categorizing different types of keywords that will colored differently in the editor. Should I categorize highlighter keywords according to their classification in the language itself (i.e., constants, compiler commands, globals, routines, etc.), or should I group some different kinds of Hugo code together according to the way that they are used and appear aesthetically?
Specifically, the main application of this question is about constants and globals. Some globals are capitalized much like constants conventionally are, but they are definitely modifiable by the user in the game source code (for instance, TEXTCOLOR). I can’t decide whether to group them together with non-capitalized global variables (such as score), along with library properties, attributes, and arrays (I think I can only have five categories of keywords in the syntax highlighter file); or to include them with the library constants.
The specific issue of the capitalized global variables is further complicated by my observation that Hugo is not case sensitive (discovered by testing, not by anything I read in the documentation). However, it is clearly the convention to capitalize the identifier names of all constants and those select globals; that’s how they appear in The Hugo Book.
Any advice would be appreciated. Thanks.