diff options
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 50195e3..5b782c4 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -72,6 +72,7 @@ Compiler.prototype = { guid: 0, compile: function(program, options) { + this.opcodes = []; this.children = []; this.depths = {list: []}; this.options = options; @@ -93,7 +94,7 @@ Compiler.prototype = { } } - return this.program(program); + return this.accept(program); }, accept: function(node) { @@ -102,11 +103,9 @@ Compiler.prototype = { program: function(program) { var statements = program.statements, statement; - this.opcodes = []; for(var i=0, l=statements.length; i<l; i++) { - statement = statements[i]; - this[statement.type](statement); + this.accept(statements[i]); } this.isSimple = l === 1; |