diff --git a/lib/liquid/parser.rb b/lib/liquid/parser.rb index c4543af..40ba22f 100644 --- a/lib/liquid/parser.rb +++ b/lib/liquid/parser.rb @@ -50,7 +50,7 @@ module Liquid def expression token = @tokens[@p] - if token[0] == :id + str = if token[0] == :id variable_signature elsif [:string, :number].include? token[0] consume @@ -58,6 +58,13 @@ module Liquid else raise SyntaxError, "#{token} is not a valid expression." end + + if look(:dot) && look(:dot, 1) + @p += 2 + str + expression + else + str + end end def argument