summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler
diff options
context:
space:
mode:
authorKevin Decker <kpdecker@gmail.com>2014-02-09 15:27:59 -0600
committerKevin Decker <kpdecker@gmail.com>2014-02-09 15:27:59 -0600
commitfe3b4cc98ed2f107325e1be25a86edfa783af0aa (patch)
tree0ed872da5edb87edc052d34bc45af255864494ae /lib/handlebars/compiler
parent7a7ad74ff1c4fe8685d33cceebe03f1474eb865d (diff)
parent14b7ef9066d107dc83deedc8e6791947811cc764 (diff)
downloadhandlebars.js-fe3b4cc98ed2f107325e1be25a86edfa783af0aa.zip
handlebars.js-fe3b4cc98ed2f107325e1be25a86edfa783af0aa.tar.gz
handlebars.js-fe3b4cc98ed2f107325e1be25a86edfa783af0aa.tar.bz2
Merge pull request #730 from wycats/jezell-master
Raw block helpers
Diffstat (limited to 'lib/handlebars/compiler')
-rw-r--r--lib/handlebars/compiler/ast.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/handlebars/compiler/ast.js b/lib/handlebars/compiler/ast.js
index 5a5f514..286917d 100644
--- a/lib/handlebars/compiler/ast.js
+++ b/lib/handlebars/compiler/ast.js
@@ -131,6 +131,20 @@ var AST = {
}
},
+ RawBlockNode: function(mustache, content, close, locInfo) {
+ LocationInfo.call(this, locInfo);
+
+ if (mustache.sexpr.id.original !== close) {
+ throw new Exception(mustache.sexpr.id.original + " doesn't match " + close, this);
+ }
+
+ content = new AST.ContentNode(content, locInfo);
+
+ this.type = 'block';
+ this.mustache = mustache;
+ this.program = new AST.ProgramNode([content], locInfo);
+ },
+
ContentNode: function(string, locInfo) {
LocationInfo.call(this, locInfo);
this.type = "content";