
The first screenshot (or the second, if the images are in a row) shows the current bespin syntax highlighting engine. It applies on a per-line base regular expressions to highlight the different parts. This approach is very fast, and new language color definitions can easily be added, but the engine is not aware of the internal structure of the code the user is typing in, and therefore such an engine cannot be extended to show in realtime syntax errors and provide intelligent code indentation and completion. The engine splits code into the following elements for colorizing:- comments
- C-style comments
- keywords
- strings
- punctuation
The second screenshot (or first, if the images are in a row) also shows that a few more Javascript code elements got identified and colored:
- atoms
- variables
- variable definitions
- local variables
- properties
- operators
- CSS
- HTML mixed (with JS, CSS)
- PHP mixed (with JS, CSS, HTML)
- Django mixin (my proof-of-concept, never got officially released)