mirror of
https://github.com/Shopify/liquid.git
synced 2026-09-18 02:10:41 -07:00
Support prop spreading
This commit is contained in:
committed by
Guilherme Carreiro
parent
0ceeefba02
commit
d4d2237b90
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user