summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2015-02-09 23:54:46 -0600
committerkpdecker <kpdecker@gmail.com>2015-02-09 23:54:46 -0600
commit39121cf8f50ec02b5a979f4911caefef8030161a (patch)
treed73b514d22c9a66dc3d01b232d1bda8176f56d7e /src
parent07f27843dc01058103d084c18a5db297b150d9cb (diff)
downloadhandlebars.js-39121cf8f50ec02b5a979f4911caefef8030161a.zip
handlebars.js-39121cf8f50ec02b5a979f4911caefef8030161a.tar.gz
handlebars.js-39121cf8f50ec02b5a979f4911caefef8030161a.tar.bz2
Handle all potential literal values
Adds support for literal helper names in a few missing cases such as block expressions and subexpressions.
Diffstat (limited to 'src')
-rw-r--r--src/handlebars.yy10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/handlebars.yy b/src/handlebars.yy
index 7de04dd..18f03b9 100644
--- a/src/handlebars.yy
+++ b/src/handlebars.yy
@@ -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(@$))
;