class Crass::Parser
def consume_function(input = @tokens)
Consumes a function and returns it.
def consume_function(input = @tokens) function = { :name => input.current[:value], :value => [], :tokens => [input.current] # Non-standard, used for serialization. } function[:tokens].concat(input.collect { while token = input.consume case token[:node] when :')' break # Non-standard. when :comment next else input.reconsume function[:value] << consume_component_value(input) end end }) create_node(:function, function) end