Handle all potential literal values

Adds support for literal helper names in a few missing cases such as block expressions and subexpressions.
This commit is contained in:
kpdecker
2015-02-09 23:54:46 -06:00
parent 07f27843dc
commit 39121cf8f5
3 changed files with 35 additions and 24 deletions
+3 -7
View File
@@ -66,7 +66,7 @@ inverseChain
;
closeBlock
: OPEN_ENDBLOCK path CLOSE -> {path: $2, strip: yy.stripFlags($1, $3)}
: OPEN_ENDBLOCK helperName CLOSE -> {path: $2, strip: yy.stripFlags($1, $3)}
;
mustache
@@ -81,11 +81,7 @@ partial
;
param
: path -> $1
| STRING -> new yy.StringLiteral($1, yy.locInfo(@$))
| NUMBER -> new yy.NumberLiteral($1, yy.locInfo(@$))
| BOOLEAN -> new yy.BooleanLiteral($1, yy.locInfo(@$))
| dataName -> $1
: helperName -> $1
| sexpr -> $1
;
@@ -108,7 +104,7 @@ blockParams
helperName
: path -> $1
| dataName -> $1
| STRING -> new yy.StringLiteral($1, yy.locInfo(@$)), yy.locInfo(@$)
| STRING -> new yy.StringLiteral($1, yy.locInfo(@$))
| NUMBER -> new yy.NumberLiteral($1, yy.locInfo(@$))
| BOOLEAN -> new yy.BooleanLiteral($1, yy.locInfo(@$))
;