Support prop spreading

This commit is contained in:
Julia Boutin
2025-10-30 12:00:44 +01:00
committed by Guilherme Carreiro
parent 0ceeefba02
commit d4d2237b90
3 changed files with 329 additions and 13 deletions
+8
View File
@@ -12,6 +12,14 @@ module Liquid
@p = point
end
def read(type = nil)
token = @tokens[@p]
if type && token[0] != type
raise SyntaxError, "Expected #{type} but found #{@tokens[@p].first}"
end
token[1]
end
def consume(type = nil)
token = @tokens[@p]
if type && token[0] != type