зеркало из https://github.com/github/ruby.git
* parse.y (block_command, block_call): simplified rules.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
68ff00d9e3
Коммит
45f3651d1c
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Mar 6 01:24:13 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* parse.y (block_command, block_call): simplified rules.
|
||||||
|
|
||||||
Mon Mar 5 18:28:35 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
Mon Mar 5 18:28:35 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
|
||||||
|
|
||||||
* test/ruby/test_regexp.rb (TestRegexp#test_source): fix typo.
|
* test/ruby/test_regexp.rb (TestRegexp#test_source): fix typo.
|
||||||
|
|
26
parse.y
26
parse.y
|
@ -1326,21 +1326,12 @@ command_call : command
|
||||||
;
|
;
|
||||||
|
|
||||||
block_command : block_call
|
block_command : block_call
|
||||||
| block_call '.' operation2 command_args
|
| block_call dot_or_colon operation2 command_args
|
||||||
{
|
{
|
||||||
/*%%%*/
|
/*%%%*/
|
||||||
$$ = NEW_CALL($1, $3, $4);
|
$$ = NEW_CALL($1, $3, $4);
|
||||||
/*%
|
/*%
|
||||||
$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
|
$$ = dispatch3(call, $1, $2, $3);
|
||||||
$$ = method_arg($$, $4);
|
|
||||||
%*/
|
|
||||||
}
|
|
||||||
| block_call tCOLON2 operation2 command_args
|
|
||||||
{
|
|
||||||
/*%%%*/
|
|
||||||
$$ = NEW_CALL($1, $3, $4);
|
|
||||||
/*%
|
|
||||||
$$ = dispatch3(call, $1, ripper_intern("::"), $3);
|
|
||||||
$$ = method_arg($$, $4);
|
$$ = method_arg($$, $4);
|
||||||
%*/
|
%*/
|
||||||
}
|
}
|
||||||
|
@ -3856,21 +3847,12 @@ block_call : command do_block
|
||||||
$$ = method_add_block($1, $2);
|
$$ = method_add_block($1, $2);
|
||||||
%*/
|
%*/
|
||||||
}
|
}
|
||||||
| block_call '.' operation2 opt_paren_args
|
| block_call dot_or_colon operation2 opt_paren_args
|
||||||
{
|
{
|
||||||
/*%%%*/
|
/*%%%*/
|
||||||
$$ = NEW_CALL($1, $3, $4);
|
$$ = NEW_CALL($1, $3, $4);
|
||||||
/*%
|
/*%
|
||||||
$$ = dispatch3(call, $1, ripper_id2sym('.'), $3);
|
$$ = dispatch3(call, $1, $2, $3);
|
||||||
$$ = method_optarg($$, $4);
|
|
||||||
%*/
|
|
||||||
}
|
|
||||||
| block_call tCOLON2 operation2 opt_paren_args
|
|
||||||
{
|
|
||||||
/*%%%*/
|
|
||||||
$$ = NEW_CALL($1, $3, $4);
|
|
||||||
/*%
|
|
||||||
$$ = dispatch3(call, $1, ripper_intern("::"), $3);
|
|
||||||
$$ = method_optarg($$, $4);
|
$$ = method_optarg($$, $4);
|
||||||
%*/
|
%*/
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче