Open WilliamRagstad opened 5 years ago
You could consider TextMate syntax definitions for this task. There are already syntax files for a lot of languages, so you won't have to recreate them. And it uses regexp! Yay?
TextMate syntax is used in TextMate of course, and VSCode, and you can import TextMate syntax files into Atom.
That's all I know. https://www.google.de/search?q=textmate+syntax+parser
The way that TEXTREME currently highlights syntax does not support regex, only string keywords, so this would require a (few) custom function(s) to implement regex.
You should have support for RegEx when defining a syntax, this would make the creation of complex syntax highlighting easier! (Please combine this with my previous issue, aka, individual syntax files.) for example inside "/syntax/javascript.txt": /(if)(?=(\t|\x20)*(.*))/,magenta
This turns all if-statements with parentheses that may be containing code into magenta. This way would be much more dynamic than just: if,magenta