diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-05 18:47:57 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-05 18:47:57 -0500 |
commit | e28653cdc709f624a4e8b68078457a151c083e31 (patch) | |
tree | e78c31b3462ea9d88ac5976e8584d57000ab47d1 /lib/Text | |
parent | 5168c77b8d784d2f2df3053f7ba125f9eb9fd60c (diff) | |
download | text-handlebars-e28653cdc709f624a4e8b68078457a151c083e31.tar.gz text-handlebars-e28653cdc709f624a4e8b68078457a151c083e31.zip |
restructure this to mirror expression() more closely
Diffstat (limited to 'lib/Text')
-rw-r--r-- | lib/Text/Xslate/Syntax/Handlebars.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Text/Xslate/Syntax/Handlebars.pm b/lib/Text/Xslate/Syntax/Handlebars.pm index fa7fd0b..8a6ffa5 100644 --- a/lib/Text/Xslate/Syntax/Handlebars.pm +++ b/lib/Text/Xslate/Syntax/Handlebars.pm @@ -337,6 +337,7 @@ sub led_variable { } my $var = $symbol; + my $rbp = $var->lbp - 1; # right-associative # was this actually supposed to be an expression? # for instance, {{foo bar baz.quux blorg}} @@ -344,7 +345,7 @@ sub led_variable { # baz.quux # this basically just reimplements $self->expression, except starting # partway through - while ($self->token->lbp > $var->lbp) { + while ($rbp < $self->token->lbp) { my $token = $self->token; $self->advance; $var = $token->led($self, $var); |