Syntax highlighting of aliases/macros/labels
tobiasvl opened this issue · 1 comments
Currently, the syntax highlighting uses the color white for (at least?) four different types of tokens: Aliased registers, calc names, macro names and labels. Should some of these be differentiated?
In my opinion, it's not a problem that calcs, macros and labels are all white. It makes them stand out, and they're functionally pretty similar. (Macros and labels aren't really that similar, but Octo already intentionally conflates them syntactically so it's easy to convert a subroutine to a macro and vice versa, so it makes sense.)
I'm less sure about aliases. I've recently started to define aliases for most or all registers, to keep track of which ones I use for scratch work and which ones are dedicated to specific uses. This means that there's a lot of white in my code, making it harder for me to parse it.
Suggestions:
- Perhaps aliases could be highlighted in orange, like regular registers?
- Perhaps calc names could be highlighted in purple, like regular constants? I'm less sure of this one, since calculated values aren't literals, but they're still constant calues.
I can see the value to something along these lines, but I think it's impractically difficult to implement. To identify names associated with a :calc or :alias in all cases, it would be necessary to parse and fully expand all macros in a program while computing syntax highlighting. In common cases it would be easier, but I would much rather leave a feature out than to have it work inconsistently.