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.
https://puu.sh/EdpCX/f881002861.png
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?
-
@Wunder-Wulfe said:
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login