From bf30bf911562a11764c768f76e2490b51423ff91 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fiset Date: Mon, 4 Mar 2013 13:25:00 -0500 Subject: [PATCH 1/2] Allow accessing properties in current context using paths. This is to avoid name collisions with registered helper functions. Issue #458 --- src/handlebars.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlebars.l b/src/handlebars.l index b32e39c6..970aaddf 100644 --- a/src/handlebars.l +++ b/src/handlebars.l @@ -31,7 +31,7 @@ "{{" { return 'OPEN'; } "=" { return 'EQUALS'; } -"."/[} ] { return 'ID'; } +"."/[}/ ] { return 'ID'; } ".." { return 'ID'; } [\/.] { return 'SEP'; } \s+ { /*ignore whitespace*/ } From 681f1a63961b04c68dc4e671513675e946f6f3f9 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Fiset Date: Mon, 4 Mar 2013 13:33:13 -0500 Subject: [PATCH 2/2] Allow colon characters in identifiers Issue #460 --- src/handlebars.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlebars.l b/src/handlebars.l index 970aaddf..d2f99634 100644 --- a/src/handlebars.l +++ b/src/handlebars.l @@ -43,7 +43,7 @@ "true"/[}\s] { return 'BOOLEAN'; } "false"/[}\s] { return 'BOOLEAN'; } \-?[0-9]+/[}\s] { return 'INTEGER'; } -[a-zA-Z0-9_$-]+/[=}\s\/.] { return 'ID'; } +[a-zA-Z0-9_$:-]+/[=}\s\/.] { return 'ID'; } '['[^\]]*']' { yytext = yytext.substr(1, yyleng-2); return 'ID'; } . { return 'INVALID'; } \s+ { /*ignore whitespace*/ }