rubyx/lib/parser/function_call.rb

17 lines
405 B
Ruby
Raw Normal View History

2014-05-10 10:14:34 +02:00
module Parser
module FunctionCall
include Parslet
rule(:argument_list) {
left_parenthesis >>
( (simple_expression.as(:argument) >> space? >>
(comma >> space? >> simple_expression.as(:argument)).repeat(0)).repeat(0,1)).as(:argument_list) >>
space? >> right_parenthesis
}
rule(:function_call) { name.as(:function_call) >> argument_list }
end
end