ajaxorg/ace — pull request #1185 by nightwing (2013-01-02 22:12:56+00:00)
Title: [WIP] Highlighting/2.0

This adds stack of states allowing highlighters to work with various hard to highlight syntaxes
(heredocs, lua strings, string interpolation, probably indentation blocks in jade )

Things still needed to do
1. find a better replacement for rules with multiple [captures ](https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript_highlight_rules.js#L135-L141) these rules are terribly slow, (time taken by match seems to be proportional to the number of capturing groups so it is faster to match whole block of string then split it)
2. get rid of trailing `")|(.))"` added to all [regexps](https://github.com/ajaxorg/ace/blob/master/lib/ace/tokenizer.js#L90). Just using slice to get unmatched parts of the string and assigning default token, will simplify string and [regexp](https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/javascript_highlight_rules.js#L259) rules in all languages.

I'd like to drop support for backreferences. They are only used in [markdown](https://github.com/ajaxorg/ace/blob/master/lib/ace/mode/markdown_highlight_rules.js#L60) mode, and can be easily replaced with something else, but keeping them makes 1 and 2 significantly harder