codemix/htmling — pull request #2 by phpnode (2014-07-03 21:11:50+00:00)
Title: Better compiler

This PR makes quite a few disjointed changes:

1. `` is now `` and supports `bind="{{something}}"`, `repeat="{{thing in things}}"`. This makes it possible to use it for both "layouts" and "partials".

2. Instead of the compiler basically being a huge AST in which we fill in the blanks, the compiler now uses a parse + replace approach. We write the compilation cases in normal JS, parse those to AST, perform transformations on it and include them in the real AST.

3. There is now an optimiser which does several passes to remove unnecessary code, hoists functions etc.

4. There is now explicit support for use as an express view engine.