diff options
author | kpdecker <kpdecker@gmail.com> | 2013-01-21 00:23:08 -0600 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2013-01-21 00:23:08 -0600 |
commit | 969b418291af1fa4f32820ee0d36ab00b4b55db1 (patch) | |
tree | 219f1ecf3c67ce13b9b42f7fadee9d8aacfb5ab4 /lib/handlebars/compiler/compiler.js | |
parent | 8e9688792b3d387635c3850827b4e3b50a1d8ba0 (diff) | |
download | handlebars.js-969b418291af1fa4f32820ee0d36ab00b4b55db1.zip handlebars.js-969b418291af1fa4f32820ee0d36ab00b4b55db1.tar.gz handlebars.js-969b418291af1fa4f32820ee0d36ab00b4b55db1.tar.bz2 |
Remove inline option from pushStack
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 9752124..d4b7d0f 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -760,7 +760,8 @@ Handlebars.JavaScriptCompiler = function() {}; // // Push an expression onto the stack push: function(expr) { - return this.pushStack(expr, true); + this.inlineStack.push(expr); + return expr; }, // [pushLiteral] @@ -955,20 +956,15 @@ Handlebars.JavaScriptCompiler = function() {}; return this.push(new Literal(item)); }, - pushStack: function(item, inline) { - if (inline) { - this.inlineStack.push(item); - return item; - } else { - this.flushInline(); + pushStack: function(item) { + this.flushInline(); - var stack = this.incrStack(); - if (item) { - this.source.push(stack + " = " + item + ";"); - } - this.compileStack.push(stack); - return stack; + var stack = this.incrStack(); + if (item) { + this.source.push(stack + " = " + item + ";"); } + this.compileStack.push(stack); + return stack; }, replaceStack: function(callback) { |