2014-06-04 18:55:04 +02:00
|
|
|
module Parser
|
|
|
|
module CallSite
|
|
|
|
include Parslet
|
|
|
|
|
|
|
|
rule(:argument_list) {
|
|
|
|
left_parenthesis >>
|
2015-09-18 21:04:08 +02:00
|
|
|
( (basic_type.as(:argument) >>
|
|
|
|
(comma >> basic_type.as(:argument)).repeat(0)).repeat(0,1)).as(:argument_list) >>
|
|
|
|
right_parenthesis
|
2014-06-04 18:55:04 +02:00
|
|
|
}
|
|
|
|
|
2015-09-18 21:04:08 +02:00
|
|
|
rule(:call_site) { (basic_type.as(:receiver) >> str(".")).maybe >> #possibly qualified
|
2014-06-04 18:55:04 +02:00
|
|
|
name.as(:call_site) >> argument_list >> comment.maybe}
|
|
|
|
|
2015-09-20 11:50:06 +02:00
|
|
|
rule(:field_access) { name.as(:receiver) >> str(".") >> name.as(:field) }
|
2015-09-15 17:57:31 +02:00
|
|
|
|
2014-06-04 18:55:04 +02:00
|
|
|
end
|
|
|
|
end
|