diff options
author | kpdecker <kpdecker@gmail.com> | 2015-08-19 06:59:32 -0700 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-08-22 10:59:34 -0700 |
commit | 408192ba9f262bb82be88091ab3ec3c16dc02c6d (patch) | |
tree | 5fb9fa403eba8b1e078096b14aaeebf5e8026292 /src | |
parent | 2a4a5447f560723a2c898e0a4d97cd929131bba6 (diff) | |
download | handlebars.js-408192ba9f262bb82be88091ab3ec3c16dc02c6d.zip handlebars.js-408192ba9f262bb82be88091ab3ec3c16dc02c6d.tar.gz handlebars.js-408192ba9f262bb82be88091ab3ec3c16dc02c6d.tar.bz2 |
Add decorator parsing
Diffstat (limited to 'src')
-rw-r--r-- | src/handlebars.l | 4 | ||||
-rw-r--r-- | src/handlebars.yy | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/handlebars.l b/src/handlebars.l index 39a7884..4c3c304 100644 --- a/src/handlebars.l +++ b/src/handlebars.l @@ -81,7 +81,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD} } <mu>"{{"{LEFT_STRIP}?">" return 'OPEN_PARTIAL'; <mu>"{{"{LEFT_STRIP}?"#>" return 'OPEN_PARTIAL_BLOCK'; -<mu>"{{"{LEFT_STRIP}?"#" return 'OPEN_BLOCK'; +<mu>"{{"{LEFT_STRIP}?"#""*"? return 'OPEN_BLOCK'; <mu>"{{"{LEFT_STRIP}?"/" return 'OPEN_ENDBLOCK'; <mu>"{{"{LEFT_STRIP}?"^"\s*{RIGHT_STRIP}?"}}" this.popState(); return 'INVERSE'; <mu>"{{"{LEFT_STRIP}?\s*"else"\s*{RIGHT_STRIP}?"}}" this.popState(); return 'INVERSE'; @@ -98,7 +98,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD} this.popState(); return 'COMMENT'; } -<mu>"{{"{LEFT_STRIP}? return 'OPEN'; +<mu>"{{"{LEFT_STRIP}?"*"? return 'OPEN'; <mu>"=" return 'EQUALS'; <mu>".." return 'ID'; diff --git a/src/handlebars.yy b/src/handlebars.yy index e94ab51..ce06498 100644 --- a/src/handlebars.yy +++ b/src/handlebars.yy @@ -52,7 +52,7 @@ block ; openBlock - : OPEN_BLOCK helperName param* hash? blockParams? CLOSE -> { path: $2, params: $3, hash: $4, blockParams: $5, strip: yy.stripFlags($1, $6) } + : OPEN_BLOCK helperName param* hash? blockParams? CLOSE -> { open: $1, path: $2, params: $3, hash: $4, blockParams: $5, strip: yy.stripFlags($1, $6) } ; openInverse |