summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-12-03 16:49:04 -0500
committerwycats <wycats@gmail.com>2010-12-03 16:49:04 -0500
commitf205cec745ab1e4921abf7a7006d612aa0eb763d (patch)
treedeee297e653d42bcac5927a61d808b83c18f05df /src
parent9a6f77af568d387d66d7cf1dcf6e4ea186d05506 (diff)
downloadhandlebars.js-f205cec745ab1e4921abf7a7006d612aa0eb763d.zip
handlebars.js-f205cec745ab1e4921abf7a7006d612aa0eb763d.tar.gz
handlebars.js-f205cec745ab1e4921abf7a7006d612aa0eb763d.tar.bz2
Finish compatibility with the old handlebars:
* foo"bar" is an invalid param * {{foo}}bar{{/baz}} is invalid * fix a number of issues with inverse sections * add partials
Diffstat (limited to 'src')
-rw-r--r--src/handlebars.yy6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/handlebars.yy b/src/handlebars.yy
index 02a2d14..ac178ba 100644
--- a/src/handlebars.yy
+++ b/src/handlebars.yy
@@ -18,8 +18,8 @@ statements
;
statement
- : openInverse program closeBlock { $$ = new yy.InverseNode($1, $2) }
- | openBlock program closeBlock { $$ = new yy.BlockNode($1, $2) }
+ : openInverse program closeBlock { $$ = new yy.InverseNode($1, $2, $3) }
+ | openBlock program closeBlock { $$ = new yy.BlockNode($1, $2, $3) }
| mustache { $$ = $1 }
| partial { $$ = $1 }
| CONTENT { $$ = new yy.ContentNode($1) }
@@ -35,7 +35,7 @@ openInverse
;
closeBlock
- : OPEN_ENDBLOCK path CLOSE { }
+ : OPEN_ENDBLOCK path CLOSE { $$ = $2 }
;
mustache