зеркало из https://github.com/github/ruby.git
* parse.y (dyna_pop_gen): pop dvars. [ruby-dev:39861]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
7cd9a5d363
Коммит
770b05dd9b
|
@ -1,3 +1,7 @@
|
|||
Thu Dec 10 01:12:55 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* parse.y (dyna_pop_gen): pop dvars. [ruby-dev:39861]
|
||||
|
||||
Thu Dec 10 00:46:43 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* node.c (dump_node): fixed for long members.
|
||||
|
|
|
@ -877,3 +877,10 @@ assert_normal_exit %q{
|
|||
end
|
||||
end
|
||||
}, bug2415
|
||||
|
||||
assert_normal_exit %q{
|
||||
a {
|
||||
b {|c.d| }
|
||||
e
|
||||
}
|
||||
}, '[ruby-dev:39861]'
|
||||
|
|
19
parse.y
19
parse.y
|
@ -8892,13 +8892,10 @@ dyna_push_gen(struct parser_params *parser)
|
|||
}
|
||||
|
||||
static void
|
||||
dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
|
||||
dyna_pop_1(struct parser_params *parser)
|
||||
{
|
||||
struct vtable *tmp;
|
||||
|
||||
while (lvtbl->args != lvargs) {
|
||||
local_pop();
|
||||
}
|
||||
tmp = lvtbl->args;
|
||||
lvtbl->args = lvtbl->args->prev;
|
||||
vtable_free(tmp);
|
||||
|
@ -8907,6 +8904,20 @@ dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
|
|||
vtable_free(tmp);
|
||||
}
|
||||
|
||||
static void
|
||||
dyna_pop_gen(struct parser_params *parser, const struct vtable *lvargs)
|
||||
{
|
||||
while (lvtbl->args != lvargs) {
|
||||
dyna_pop_1(parser);
|
||||
if (!lvtbl->args) {
|
||||
struct local_vars *local = lvtbl->prev;
|
||||
xfree(lvtbl);
|
||||
lvtbl = local;
|
||||
}
|
||||
}
|
||||
dyna_pop_1(parser);
|
||||
}
|
||||
|
||||
static int
|
||||
dyna_in_block_gen(struct parser_params *parser)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче