diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/handlebars.l | 2 | ||||
-rw-r--r-- | src/handlebars.yy | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/handlebars.l b/src/handlebars.l index 55d8efc..ff21283 100644 --- a/src/handlebars.l +++ b/src/handlebars.l @@ -110,7 +110,7 @@ ID [^\s!"#%-,\.\/;->@\[-\^`\{-~]+/{LOOKAHEAD} <mu>{ID} return 'ID'; -<mu>'['[^\]]*']' yytext = strip(1,2); return 'ID'; +<mu>'['[^\]]*']' return 'ID'; <mu>. return 'INVALID'; <INITIAL,mu><<EOF>> return 'EOF'; diff --git a/src/handlebars.yy b/src/handlebars.yy index 01ef7fb..d67a7da 100644 --- a/src/handlebars.yy +++ b/src/handlebars.yy @@ -94,11 +94,11 @@ hash ; hashSegment - : ID EQUALS param -> new yy.HashPair($1, $3, yy.locInfo(@$)) + : ID EQUALS param -> new yy.HashPair(yy.id($1), $3, yy.locInfo(@$)) ; blockParams - : OPEN_BLOCK_PARAMS ID+ CLOSE_BLOCK_PARAMS -> $2 + : OPEN_BLOCK_PARAMS ID+ CLOSE_BLOCK_PARAMS -> yy.id($2) ; helperName @@ -125,6 +125,6 @@ path ; pathSegments - : pathSegments SEP ID { $1.push({part: $3, separator: $2}); $$ = $1; } - | ID -> [{part: $1}] + : pathSegments SEP ID { $1.push({part: yy.id($3), original: $3, separator: $2}); $$ = $1; } + | ID -> [{part: yy.id($1), original: $1}] ; |