summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2014-11-08 18:57:06 -0600
committerkpdecker <kpdecker@gmail.com>2014-11-08 18:57:06 -0600
commitbf8cc50798513b0269ec4e509947fb1d37ec6560 (patch)
tree44facd2949599dd97409ab004923a0844c4ac3bc /src
parentac208b1bcd5f5661a4eabaeba1b6ef0c8767bad0 (diff)
parenta5d0491d57f53425ef155a3a803a881371bf07b1 (diff)
downloadhandlebars.js-bf8cc50798513b0269ec4e509947fb1d37ec6560.zip
handlebars.js-bf8cc50798513b0269ec4e509947fb1d37ec6560.tar.gz
handlebars.js-bf8cc50798513b0269ec4e509947fb1d37ec6560.tar.bz2
Merge branch 'remove-block-mustache' of github.com:mmun/handlebars.js into mmun-remove-block-mustache
Conflicts: lib/handlebars/compiler/helpers.js spec/parser.js
Diffstat (limited to 'src')
-rw-r--r--src/handlebars.yy14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/handlebars.yy b/src/handlebars.yy
index 3bd9abc..5448966 100644
--- a/src/handlebars.yy
+++ b/src/handlebars.yy
@@ -17,16 +17,20 @@ statement
| block -> $1
| rawBlock -> $1
| partial -> $1
- | CONTENT -> new yy.ContentNode($1, @$)
+ | content -> $1
| COMMENT -> new yy.CommentNode(yy.stripComment($1), yy.stripFlags($1, $1), @$)
;
+content
+ : CONTENT -> new yy.ContentNode($1, @$)
+ ;
+
rawBlock
- : openRawBlock CONTENT END_RAW_BLOCK -> new yy.RawBlockNode($1, $2, $3, @$)
+ : openRawBlock content END_RAW_BLOCK -> yy.prepareRawBlock($1, $2, $3, @$)
;
openRawBlock
- : OPEN_RAW_BLOCK sexpr CLOSE_RAW_BLOCK -> new yy.MustacheNode($2, null, '', '', @$)
+ : OPEN_RAW_BLOCK sexpr CLOSE_RAW_BLOCK -> { sexpr: $2 }
;
block
@@ -35,11 +39,11 @@ block
;
openBlock
- : OPEN_BLOCK sexpr CLOSE -> new yy.MustacheNode($2, null, $1, yy.stripFlags($1, $3), @$)
+ : OPEN_BLOCK sexpr CLOSE -> { sexpr: $2, strip: yy.stripFlags($1, $3) }
;
openInverse
- : OPEN_INVERSE sexpr CLOSE -> new yy.MustacheNode($2, null, $1, yy.stripFlags($1, $3), @$)
+ : OPEN_INVERSE sexpr CLOSE -> { sexpr: $2, strip: yy.stripFlags($1, $3) }
;
openInverseChain