зеркало из https://github.com/github/ruby.git
* parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
0cf0b82418
Коммит
058ec52c0d
|
@ -1,3 +1,7 @@
|
|||
Thu Nov 29 16:59:10 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (stmt): remove unnecessary NODE_BEGIN. [ruby-core:13814]
|
||||
|
||||
Wed Nov 28 18:08:00 2007 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/json, lib/json, test/json: Update to JSON 1.1.2.
|
||||
|
|
15
parse.y
15
parse.y
|
@ -345,7 +345,8 @@ static int value_expr_gen(struct parser_params*,NODE*);
|
|||
static void void_expr_gen(struct parser_params*,NODE*);
|
||||
static NODE *remove_begin(NODE*);
|
||||
#define value_expr(node) value_expr_gen(parser, (node) = remove_begin(node))
|
||||
#define void_expr(node) void_expr_gen(parser, (node) = remove_begin(node))
|
||||
#define void_expr0(node) void_expr_gen(parser, (node))
|
||||
#define void_expr(node) void_expr0((node) = remove_begin(node))
|
||||
static void void_stmts_gen(struct parser_params*,NODE*);
|
||||
#define void_stmts(node) void_stmts_gen(parser, node)
|
||||
static void reduce_nodes_gen(struct parser_params*,NODE**);
|
||||
|
@ -798,10 +799,9 @@ compstmt : stmts opt_terms
|
|||
{
|
||||
/*%%%*/
|
||||
void_stmts($1);
|
||||
$$ = $1;
|
||||
/*%
|
||||
$$ = $1;
|
||||
%*/
|
||||
$$ = $1;
|
||||
}
|
||||
;
|
||||
|
||||
|
@ -884,7 +884,7 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem
|
|||
| stmt modifier_if expr_value
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = NEW_IF(cond($3), $1, 0);
|
||||
$$ = NEW_IF(cond($3), remove_begin($1), 0);
|
||||
fixpos($$, $3);
|
||||
if (cond_negative(&$$->nd_cond)) {
|
||||
$$->nd_else = $$->nd_body;
|
||||
|
@ -897,7 +897,7 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem
|
|||
| stmt modifier_unless expr_value
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = NEW_UNLESS(cond($3), $1, 0);
|
||||
$$ = NEW_UNLESS(cond($3), remove_begin($1), 0);
|
||||
fixpos($$, $3);
|
||||
if (cond_negative(&$$->nd_cond)) {
|
||||
$$->nd_body = $$->nd_else;
|
||||
|
@ -942,7 +942,8 @@ stmt : keyword_alias fitem {lex_state = EXPR_FNAME;} fitem
|
|||
| stmt modifier_rescue stmt
|
||||
{
|
||||
/*%%%*/
|
||||
$$ = NEW_RESCUE($1, NEW_RESBODY(0,$3,0), 0);
|
||||
NODE *resq = NEW_RESBODY(0, remove_begin($3), 0);
|
||||
$$ = NEW_RESCUE(remove_begin($1), resq, 0);
|
||||
/*%
|
||||
$$ = dispatch2(rescue_mod, $3, $1);
|
||||
%*/
|
||||
|
@ -7943,7 +7944,7 @@ void_stmts_gen(struct parser_params *parser, NODE *node)
|
|||
|
||||
for (;;) {
|
||||
if (!node->nd_next) return;
|
||||
void_expr(node->nd_head);
|
||||
void_expr0(node->nd_head);
|
||||
node = node->nd_next;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#define RUBY_VERSION "1.9.0"
|
||||
#define RUBY_RELEASE_DATE "2007-11-28"
|
||||
#define RUBY_RELEASE_DATE "2007-11-29"
|
||||
#define RUBY_VERSION_CODE 190
|
||||
#define RUBY_RELEASE_CODE 20071128
|
||||
#define RUBY_RELEASE_CODE 20071129
|
||||
#define RUBY_PATCHLEVEL 0
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
|
@ -9,7 +9,7 @@
|
|||
#define RUBY_VERSION_TEENY 0
|
||||
#define RUBY_RELEASE_YEAR 2007
|
||||
#define RUBY_RELEASE_MONTH 11
|
||||
#define RUBY_RELEASE_DAY 28
|
||||
#define RUBY_RELEASE_DAY 29
|
||||
|
||||
#ifdef RUBY_EXTERN
|
||||
RUBY_EXTERN const char ruby_version[];
|
||||
|
|
Загрузка…
Ссылка в новой задаче