wycats/handlebars.js — pull request #429 by machty (2013-02-06 22:59:38+00:00)
Title: Handlebars.parse can now be passed an already-compiled Handlebars AST an...

...d return it.

This is largely motivated by my compile-to-Handlebars templating language Emblem (https://github.com/machty/emblem.js). Basically, without this change to Handlebars, it gets extremely messy extremely fast to allow another language that compiles to a Handlebars AST to plug into the Handlebars compiler. In particular, the compile/precompile functions would have to be duplicated, and once again once integration with Ember is attempted.

So, this changes allows you to pass an already-compiled HB AST to compile/precompile which previously could only handle an uncompiled string.