2014-05-10 11:14:34 +03:00
|
|
|
module Parser
|
2014-05-13 21:15:02 +03:00
|
|
|
module CallSite
|
2014-05-10 11:14:34 +03:00
|
|
|
include Parslet
|
|
|
|
|
|
|
|
rule(:argument_list) {
|
|
|
|
left_parenthesis >>
|
2014-05-28 15:22:37 +03:00
|
|
|
( ((operator_expression|value_expression).as(:argument) >> space? >>
|
|
|
|
(comma >> space? >> (operator_expression|value_expression).as(:argument)).repeat(0)).repeat(0,1)).as(:argument_list) >>
|
2014-05-10 11:14:34 +03:00
|
|
|
space? >> right_parenthesis
|
|
|
|
}
|
|
|
|
|
2014-06-01 14:46:16 +03:00
|
|
|
rule(:call_site) { ((module_name|instance_variable|name).as(:receiver) >> str(".")).maybe >> #possibly qualified
|
2014-05-31 17:58:26 +03:00
|
|
|
name.as(:call_site) >> argument_list >> comment.maybe}
|
2014-05-10 11:14:34 +03:00
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|