by jokoon · 9y ago · 0 comments
The syntax highlighting functionality alone is a combination of something as complex as what a compiler/parser does, and you have to do it almost in real time.
So if you want to color every different part like operators, symbols, braces, with a different color, and you try to do this on C++, it is not going to be a small task...
Also something you learn about text editors is the rope data structure. https://en.wikipedia.org/wiki/Rope_(data_structure)
For a lot of modes, Emacs does this using regex.
Regex'ing languages like HTML or C++ can be quite mind breaking... I think.