Remove inline option from pushStack

This commit is contained in:
kpdecker
2013-01-21 00:23:08 -06:00
parent 8e9688792b
commit 969b418291
+9 -13
View File
@@ -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) {