More cleanup

* Make block and inverse use the main helper path
* Eliminate separate inverse AST node
This commit is contained in:
tomhuda
2012-05-28 17:00:41 -07:00
parent 3486b530be
commit 175c6fae0f
4 changed files with 164 additions and 80 deletions
+2 -8
View File
@@ -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) {