summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortomhuda <tomhuda@strobecorp.com>2011-02-11 20:11:52 -0800
committertomhuda <tomhuda@strobecorp.com>2011-02-11 20:11:52 -0800
commitd7f93c09e7031b28b27296b1e8f8e8bc801e56c9 (patch)
treebfc0796205db310e02a4e9b2d7d5ecb33d897743
parent299a0e81e321b5b2cee2ee3a03c258699c8f895c (diff)
downloadhandlebars.js-0.9.0.pre.4.zip
handlebars.js-0.9.0.pre.4.tar.gz
handlebars.js-0.9.0.pre.4.tar.bz2
Subclasses should be able to replace the compiler - this is needed so that child views are compiled using the updated semantics of the parent compiler0.9.0.pre.4
-rw-r--r--lib/handlebars/vm.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/handlebars/vm.js b/lib/handlebars/vm.js
index 2a1d4e9..5dca847 100644
--- a/lib/handlebars/vm.js
+++ b/lib/handlebars/vm.js
@@ -523,13 +523,15 @@ Handlebars.JavaScriptCompiler = function() {};
// HELPERS
+ compiler: JavaScriptCompiler,
+
compileChildren: function(environment, data) {
var children = environment.children, child, compiler;
var compiled = [];
for(var i=0, l=children.length; i<l; i++) {
child = children[i];
- compiler = new JavaScriptCompiler();
+ compiler = new this.compiler();
compiled[i] = compiler.compile(child, data);
}