1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack. This is a preparation for keyword argument (see [ruby-core:40290]).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34133 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2011-12-26 14:19:52 +00:00
parent 68fde4449a
commit 90b1afa310
3 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,8 @@
Mon Dec 26 20:59:51 2011 Yusuke Endoh <mame@tsg.ne.jp>
* node.h, parse.y (lambda, f_larglist): remove NEW_LAMBDA hack.
This is a preparation for keyword argument (see [ruby-core:40290]).
Mon Dec 26 22:01:19 2011 Hiroshi Shirosaki <h.shirosaki@gmail.com>
* io.c (rb_sys_fail_path): move the definition.

2
node.h
View file

@ -362,7 +362,7 @@ typedef struct RNode {
#define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
#define NEW_FOR(v,i,b) NEW_NODE(NODE_FOR,v,b,i)
#define NEW_ITER(a,b) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b),0)
#define NEW_LAMBDA(a) NEW_NODE(NODE_LAMBDA,a,0,0)
#define NEW_LAMBDA(a,b) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b),0)
#define NEW_BREAK(s) NEW_NODE(NODE_BREAK,s,0,0)
#define NEW_NEXT(s) NEW_NODE(NODE_NEXT,s,0,0)
#define NEW_REDO() NEW_NODE(NODE_REDO,0,0,0)

View file

@ -3551,8 +3551,7 @@ lambda : {
{
lpar_beg = $<num>2;
/*%%%*/
$$ = $3;
$$->nd_body = NEW_SCOPE($3->nd_head, $4);
$$ = NEW_LAMBDA($3, $4);
/*%
$$ = dispatch2(lambda, $3, $4);
%*/
@ -3563,7 +3562,7 @@ lambda : {
f_larglist : '(' f_args opt_bv_decl rparen
{
/*%%%*/
$$ = NEW_LAMBDA($2);
$$ = $2;
/*%
$$ = dispatch1(paren, $2);
%*/
@ -3571,7 +3570,7 @@ f_larglist : '(' f_args opt_bv_decl rparen
| f_args
{
/*%%%*/
$$ = NEW_LAMBDA($1);
$$ = $1;
/*%
$$ = $1;
%*/