mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Omit first argument of NEW_CASE2
* node.h (NEW_CASE2): Omit first argument of NEW_CASE2, bacause the first argument of NEW_CASE2 is always 0. * parse.y: Ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6f33cde636
commit
a6f372d129
2 changed files with 2 additions and 2 deletions
2
node.h
2
node.h
|
@ -360,7 +360,7 @@ typedef struct RNode {
|
|||
#define NEW_IF(c,t,e) NEW_NODE(NODE_IF,c,t,e)
|
||||
#define NEW_UNLESS(c,t,e) NEW_NODE(NODE_UNLESS,c,t,e)
|
||||
#define NEW_CASE(h,b) NEW_NODE(NODE_CASE,h,b,0)
|
||||
#define NEW_CASE2(h,b) NEW_NODE(NODE_CASE2,h,b,0)
|
||||
#define NEW_CASE2(b) NEW_NODE(NODE_CASE2,0,b,0)
|
||||
#define NEW_WHEN(c,t,e) NEW_NODE(NODE_WHEN,c,t,e)
|
||||
#define NEW_WHILE(c,b,n) NEW_NODE(NODE_WHILE,c,b,n)
|
||||
#define NEW_UNTIL(c,b,n) NEW_NODE(NODE_UNTIL,c,b,n)
|
||||
|
|
2
parse.y
2
parse.y
|
@ -2911,7 +2911,7 @@ primary : literal
|
|||
| k_case opt_terms case_body k_end
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = NEW_CASE2(0, $3);
|
||||
$$ = NEW_CASE2($3);
|
||||
nd_set_line($3, $<num>1);
|
||||
nd_set_lineno($$, @1.first_line);
|
||||
nd_set_column($$, @1.first_column);
|
||||
|
|
Loading…
Reference in a new issue