summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/ast.js
diff options
context:
space:
mode:
authortomhuda <tomhuda@tilde.io>2012-05-28 17:00:41 -0700
committertomhuda <tomhuda@tilde.io>2012-05-28 17:00:41 -0700
commit175c6fae0f704b2f1088728136e238186fbb1cf3 (patch)
treed539e2275a589f998ef02ed128976401247f0809 /lib/handlebars/compiler/ast.js
parent3486b530beb9a9516bb8c67470b3515133259559 (diff)
downloadhandlebars.js-175c6fae0f704b2f1088728136e238186fbb1cf3.zip
handlebars.js-175c6fae0f704b2f1088728136e238186fbb1cf3.tar.gz
handlebars.js-175c6fae0f704b2f1088728136e238186fbb1cf3.tar.bz2
More cleanup
* Make block and inverse use the main helper path * Eliminate separate inverse AST node
Diffstat (limited to 'lib/handlebars/compiler/ast.js')
-rw-r--r--lib/handlebars/compiler/ast.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js
index 47ecd35..8381ca5 100644
--- a/lib/handlebars/compiler/ast.js
+++ b/lib/handlebars/compiler/ast.js
@@ -48,18 +48,12 @@ var Handlebars = require('./base');
}
};
- Handlebars.AST.BlockNode = function(mustache, program, close) {
+ Handlebars.AST.BlockNode = function(mustache, program, inverse, close) {
verifyMatch(mustache.id, close);
this.type = "block";
this.mustache = mustache;
this.program = program;
- };
-
- Handlebars.AST.InverseNode = function(mustache, program, close) {
- verifyMatch(mustache.id, close);
- this.type = "inverse";
- this.mustache = mustache;
- this.program = program;
+ this.inverse = inverse;
};
Handlebars.AST.ContentNode = function(string) {