class Liquid::Parser
def consume?(type)
Returns the token's contents if it was consumed
Only consumes the token if it matches the type
def consume?(type) token = @tokens[@p] return false unless token && token[0] == type @p += 1 token[1] end
def consume?(type) token = @tokens[@p] return false unless token && token[0] == type @p += 1 token[1] end