diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-05 08:59:20 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-05 08:59:20 +0000 |
commit | 503b858cefcc945405185c3c70dd07a60f920469 (patch) | |
tree | 10996cd780b341156b2fb3526e77f682f6581f0d /iseq.c | |
parent | a6794c4b01ceb96d3d36f8854309e2e3b878f7e3 (diff) | |
download | ruby-503b858cefcc945405185c3c70dd07a60f920469.tar.gz |
node.h: define rb_ast_body_t and restructure rb_ast_t
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -708,7 +708,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, c ast = (*parse)(parser, file, src, ln); } - if (!ast->root) { + if (!ast->body.root) { rb_ast_dispose(ast); rb_exc_raise(GET_EC()->errinfo); } @@ -716,7 +716,7 @@ rb_iseq_compile_with_option(VALUE src, VALUE file, VALUE realpath, VALUE line, c INITIALIZED VALUE label = parent ? parent->body->location.label : rb_fstring_cstr("<compiled>"); - iseq = rb_iseq_new_with_opt(ast->root, label, file, realpath, line, + iseq = rb_iseq_new_with_opt(ast->body.root, label, file, realpath, line, parent, type, &option); rb_ast_dispose(ast); } @@ -927,17 +927,17 @@ iseqw_s_compile_file(int argc, VALUE *argv, VALUE self) parser = rb_parser_new(); rb_parser_set_context(parser, NULL, FALSE); ast = rb_parser_compile_file_path(parser, file, f, NUM2INT(line)); - if (!ast->root) exc = GET_EC()->errinfo; + if (!ast->body.root) exc = GET_EC()->errinfo; rb_io_close(f); - if (!ast->root) { + if (!ast->body.root) { rb_ast_dispose(ast); rb_exc_raise(exc); } make_compile_option(&option, opt); - ret = iseqw_new(rb_iseq_new_with_opt(ast->root, rb_fstring_cstr("<main>"), + ret = iseqw_new(rb_iseq_new_with_opt(ast->body.root, rb_fstring_cstr("<main>"), file, rb_realpath_internal(Qnil, file, 1), line, NULL, ISEQ_TYPE_TOP, &option)); |