3 ms·
Interesting. You should look into adopting Lpeg to do your syntax parsing and coloring, rather than defining all languages yourself. http://www.inf.puc-rio.br
by cschmidt 10y ago
Interesting. You should look into adopting Lpeg to do your syntax parsing and coloring, rather than defining all languages yourself.
http://www.inf.puc-rio.br/~roberto/lpeg/ http://www.inf.puc-rio.br/~roberto/lpeg/
http://peterodding.com/code/lua/lxsh http://peterodding.com/code/lua/lxsh
http://foicica.com/scintillua/ http://foicica.com/scintillua/
http://leafo.net/guides/parsing-expression-grammars.html http://leafo.net/guides/parsing-expression-grammars.html
- sdegutis 10y agoAs another person writing an Emacs-like Lua-based fork of antirez's original text editor, I'm not convinced that's the right way to go. The vast majority of language definitions will work fine with antirez's much simpler solution. And even if something more complex is needed, I'm not sure that requiring language authors to learn LPeg is a good idea.
- stevekemp 10y agoBelated update, but thanks for the tip. In the end I did indeed add syntax-highlighting via the use of the LPEG library.