diff options
Diffstat (limited to 'lib/handlebars/compiler/printer.js')
-rw-r--r-- | lib/handlebars/compiler/printer.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/handlebars/compiler/printer.js b/lib/handlebars/compiler/printer.js index 448331c..55232cc 100644 --- a/lib/handlebars/compiler/printer.js +++ b/lib/handlebars/compiler/printer.js @@ -45,7 +45,7 @@ PrintVisitor.prototype.Program = function(program) { }; PrintVisitor.prototype.MustacheStatement = function(mustache) { - return this.pad('{{ ' + this.accept(mustache.sexpr) + ' }}'); + return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); }; PrintVisitor.prototype.BlockStatement = function(block) { @@ -53,7 +53,7 @@ PrintVisitor.prototype.BlockStatement = function(block) { out = out + this.pad('BLOCK:'); this.padding++; - out = out + this.pad(this.accept(block.sexpr)); + out = out + this.pad(this.SubExpression(block)); if (block.program) { out = out + this.pad('PROGRAM:'); this.padding++; @@ -74,13 +74,12 @@ PrintVisitor.prototype.BlockStatement = function(block) { }; PrintVisitor.prototype.PartialStatement = function(partial) { - var sexpr = partial.sexpr, - content = 'PARTIAL:' + sexpr.name.original; - if(sexpr.params[0]) { - content += ' ' + this.accept(sexpr.params[0]); + var content = 'PARTIAL:' + partial.name.original; + if(partial.params[0]) { + content += ' ' + this.accept(partial.params[0]); } - if (sexpr.hash) { - content += ' ' + this.accept(sexpr.hash); + if (partial.hash) { + content += ' ' + this.accept(partial.hash); } return this.pad('{{> ' + content + ' }}'); }; |