17
this post was submitted on 07 Aug 2023
17 points (100.0% liked)
Text Editors
455 readers
2 users here now
Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Nice job! Which was the most challenging part?
So far, the most challenging part was highlighting things that counts as comment rather than pointers to image pixels or accessible variables. That's not the end of my trouble though.
I do want to figure out how to highlight "expr" including newlines inside expr. expr is basically any mathematical expression that is utilized on JIT compilation.
Along with that to set up regex inside it to highlight section of expr.
While still maintaining priority of regex. So, if one regex is more important, it'll overwrite whatever highlighted.
Was that what modes are for?
What do you mean? I'm pretty new to making syntax highlighting for KDE Kate, so I'm just now fixing my other thing before I get into much more advanced concept of it.
The way I remember stuff and it seems to be explained in here a context is a way to limit the amount of checked regexes. So as I understand you can start an expr context if you hit one of those keywords. Kind of like modes in XSL or working with a stack.
That document also describes how to handle newlines in context.