2014-05-10 10:14:34 +02:00
|
|
|
module Parser
|
2014-05-13 20:15:02 +02:00
|
|
|
module CallSite
|
2014-05-10 10:14:34 +02:00
|
|
|
include Parslet
|
|
|
|
|
|
|
|
rule(:argument_list) {
|
|
|
|
left_parenthesis >>
|
2014-05-28 14:22:37 +02: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 10:14:34 +02:00
|
|
|
space? >> right_parenthesis
|
|
|
|
}
|
|
|
|
|
2014-05-31 16:02:55 +02:00
|
|
|
rule(:call_site) { (name.as(:receiver) >> str(".")).repeat(0,1) >> name.as(:call_site) >> argument_list >> comment.maybe}
|
2014-05-10 10:14:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|