An annoying issue with UDL
So, I’ve been messing around and setting up the highlighting for my own language but I ran into a problem where the end statements would not be colored properly although they were correctly categorized.
The end statement for the for loop is dark purple when it should be a maroon color. How would I fix this and is there any better alternative?
The end statement for the for loop is dark purple when it should be a maroon color.
because the UDL lexer cannot differentiate between “end (after func)” and “end (after for)”, because by that point in the lexing, I believe all it sees is “end”, and has lost the context of “(after ___)”.
Using UDL, I don’t think you can fix it, and I don’t think there is an alternative. But I could be wrong, and someone else can feel free to chime in.