diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 05:13:48 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-21 05:13:48 +0000 |
commit | 7b5d9d70860a5441b8084c255b2fc493418f0baf (patch) | |
tree | 2cdc2281e8476474f4b1678e308f3c9fb7f3a528 /parse.y | |
parent | 1b7465e893131c8a8b27078704223ecfb2311119 (diff) | |
download | ruby-7b5d9d70860a5441b8084c255b2fc493418f0baf.tar.gz |
* parse.y (method_call): remove (fn)(args) style lambda
invocation, add fn.(args) instead.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 34 |
1 files changed, 22 insertions, 12 deletions
@@ -3264,6 +3264,28 @@ method_call : operation paren_args $$ = dispatch3(call, $1, ripper_intern("::"), $3); %*/ } + | primary_value '.' paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, rb_intern("call"), $3); + fixpos($$, $1); + /*% + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + %*/ + } + | primary_value tCOLON2 paren_args + { + /*%%%*/ + $$ = NEW_CALL($1, rb_intern("call"), $3); + fixpos($$, $1); + /*% + $$ = dispatch3(call, dispatch1(paren, $1), + ripper_id2sym('.'), rb_intern("call")); + $$ = method_optarg($$, $3); + %*/ + } | kSUPER paren_args { /*%%%*/ @@ -3280,18 +3302,6 @@ method_call : operation paren_args $$ = dispatch0(zsuper); %*/ } - | tLPAREN compstmt ')' paren_args - { - /*%%%*/ - if (!$2) $2 = NEW_NIL(); - $$ = NEW_CALL($2, rb_intern("call"), $4); - fixpos($$, $2); - /*% - $$ = dispatch3(call, dispatch1(paren, $2), - ripper_id2sym('.'), rb_intern("call")); - $$ = method_optarg($$, $4); - %*/ - } | primary_value '[' opt_call_args rbracket { /*%%%*/ |