may call with r_value
This commit is contained in:
parent
308c0efc05
commit
85adfa7107
@ -2,17 +2,19 @@ module Parser
|
||||
module CallSite
|
||||
include Parslet
|
||||
|
||||
rule(:field_access) { name.as(:receiver) >> str(".") >> name.as(:field) }
|
||||
|
||||
rule(:r_value) { call_site | field_access | basic_type }
|
||||
|
||||
rule(:argument_list) {
|
||||
left_parenthesis >>
|
||||
( (basic_type.as(:argument) >>
|
||||
(comma >> basic_type.as(:argument)).repeat(0)).repeat(0,1)).as(:argument_list) >>
|
||||
(comma >> r_value.as(:argument)).repeat(0)).repeat(0,1)).as(:argument_list) >>
|
||||
right_parenthesis
|
||||
}
|
||||
|
||||
rule(:call_site) { (basic_type.as(:receiver) >> str(".")).maybe >> #possibly qualified
|
||||
name.as(:call_site) >> argument_list >> comment.maybe}
|
||||
|
||||
rule(:field_access) { name.as(:receiver) >> str(".") >> name.as(:field) }
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -2,8 +2,6 @@ module Parser
|
||||
module Expression
|
||||
include Parslet
|
||||
|
||||
rule(:r_value) { call_site | field_access |basic_type }
|
||||
|
||||
rule(:expression) { (simple_return | while_do | small_conditional | conditional |
|
||||
operator_expression | call_site | class_field | field |
|
||||
hash_constant | array_constant) }
|
||||
|
Loading…
Reference in New Issue
Block a user