Skip to content

Commit

Permalink
Remove RawBlockNode in favor of prepareRawBlock helper
Browse files Browse the repository at this point in the history
  • Loading branch information
mmun committed Nov 5, 2014
1 parent 12e3d21 commit a5d0491
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 0 additions & 8 deletions lib/handlebars/compiler/ast.js
Expand Up @@ -93,14 +93,6 @@ var AST = {
}
},

RawBlockNode: function(sexpr, content, locInfo) {
LocationInfo.call(this, locInfo);

this.type = 'block';
this.sexpr = sexpr;
this.program = new AST.ProgramNode([content], {}, locInfo);
},

ContentNode: function(string, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "content";
Expand Down
4 changes: 3 additions & 1 deletion lib/handlebars/compiler/helpers.js
Expand Up @@ -23,7 +23,9 @@ export function prepareRawBlock(openRawBlock, content, close, locInfo) {
throw new Exception(openRawBlock.sexpr.id.original + " doesn't match " + close, errorNode);
}

return new this.RawBlockNode(openRawBlock.sexpr, content, locInfo);
var program = new this.ProgramNode([content], {}, locInfo);

return new this.BlockNode(openRawBlock.sexpr, program, undefined, undefined, locInfo);
}

export function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
Expand Down

0 comments on commit a5d0491

Please sign in to comment.