summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/ast.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/ast.js')
-rw-r--r--lib/handlebars/compiler/ast.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js
index e388e54..74f276e 100644
--- a/lib/handlebars/compiler/ast.js
+++ b/lib/handlebars/compiler/ast.js
@@ -9,12 +9,12 @@ function LocationInfo(locInfo){
}
var AST = {
- ProgramNode: function(statements, inverseStrip, inverse, locInfo) {
+ ProgramNode: function(isRoot, statements, inverseStrip, inverse, locInfo) {
var inverseLocationInfo, firstInverseNode;
- if (arguments.length === 3) {
+ if (arguments.length === 4) {
locInfo = inverse;
inverse = null;
- } else if (arguments.length === 2) {
+ } else if (arguments.length === 3) {
locInfo = inverseStrip;
inverseStrip = null;
}
@@ -33,9 +33,9 @@ var AST = {
last_column: firstInverseNode.lastColumn,
first_column: firstInverseNode.firstColumn
};
- this.inverse = new AST.ProgramNode(inverse, inverseStrip, inverseLocationInfo);
+ this.inverse = new AST.ProgramNode(isRoot, inverse, inverseStrip, inverseLocationInfo);
} else {
- this.inverse = new AST.ProgramNode(inverse, inverseStrip);
+ this.inverse = new AST.ProgramNode(isRoot, inverse, inverseStrip);
}
this.strip.right = inverseStrip.left;
} else if (inverseStrip) {
@@ -142,7 +142,7 @@ var AST = {
this.type = 'block';
this.mustache = mustache;
- this.program = new AST.ProgramNode([content], locInfo);
+ this.program = new AST.ProgramNode(false, [content], locInfo);
},
ContentNode: function(string, locInfo) {