DandyHQ / mace

A Modern Text Editor
Other
15 stars 1 forks source link

Syntax Highlighting #16

Open vkitchen opened 7 years ago

vkitchen commented 7 years ago

Syntax Highlighting is a key feature of modern text editors. For Mace to be taken seriously it is something that needs to be implemented. The first step to implement highlighting is to write a simple tokenizer to classify language. This is a relatively simple project as it can be created outside of the Mace code base. All it need do is take an input file, processing it and printing out each token on its own line along with the token type. How it does the splitting and classifying needs to be investigated. Preferably it should be done in such a way that it supports as many languages as possible with a simple config file for adding a new language. How this should look could be stolen from the myriad of existing text editors. Of course this simplified method will provide poor support for Context-Sensitive programming languages (C++, Perl, Perl6) but they're not our target at the moment. And at least for now can be disregarded.

vkitchen commented 7 years ago

http://idiallo.com/blog/javascript-syntax-highlighter http://monkeystudio.org/node/186

mytchel commented 7 years ago

http://viewsourcecode.org/snaptoken/kilo/07.syntaxHighlighting.html