soml-parser/lib/parser/call_site.rb

18 lines
576 B
Ruby
Raw Normal View History

2014-06-04 18:55:04 +02:00
module Parser
module CallSite
2015-08-28 22:37:25 +02:00
include output
2014-06-04 18:55:04 +02:00
rule(:argument_list) {
left_parenthesis >>
( ((operator_expression|value_expression).as(:argument) >> space? >>
(comma >> space? >> (operator_expression|value_expression).as(:argument)).repeat(0)).repeat(0,1)).as(:argument_list) >>
space? >> right_parenthesis
}
2014-06-07 19:47:52 +02:00
rule(:call_site) { ((module_name|instance_variable|basic_type).as(:receiver) >> str(".")).maybe >> #possibly qualified
2014-06-04 18:55:04 +02:00
name.as(:call_site) >> argument_list >> comment.maybe}
end
end