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.
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.