mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Rename vast
to ast_value
There is an English word "vast". This commit changes the name to be more clear name to avoid confusion.
This commit is contained in:
parent
e1905ca180
commit
899d9f79dd
12 changed files with 239 additions and 239 deletions
30
ruby.c
30
ruby.c
|
@ -2060,7 +2060,7 @@ static VALUE
|
|||
process_script(ruby_cmdline_options_t *opt)
|
||||
{
|
||||
rb_ast_t *ast;
|
||||
VALUE vast;
|
||||
VALUE ast_value;
|
||||
VALUE parser = rb_parser_new();
|
||||
const unsigned int dump = opt->dump;
|
||||
|
||||
|
@ -2080,7 +2080,7 @@ process_script(ruby_cmdline_options_t *opt)
|
|||
ruby_set_script_name(progname);
|
||||
rb_parser_set_options(parser, opt->do_print, opt->do_loop,
|
||||
opt->do_line, opt->do_split);
|
||||
vast = rb_parser_compile_string(parser, opt->script, opt->e_script, 1);
|
||||
ast_value = rb_parser_compile_string(parser, opt->script, opt->e_script, 1);
|
||||
}
|
||||
else {
|
||||
VALUE f;
|
||||
|
@ -2088,14 +2088,14 @@ process_script(ruby_cmdline_options_t *opt)
|
|||
f = open_load_file(opt->script_name, &xflag);
|
||||
opt->xflag = xflag != 0;
|
||||
rb_parser_set_context(parser, 0, f == rb_stdin);
|
||||
vast = load_file(parser, opt->script_name, f, 1, opt);
|
||||
ast_value = load_file(parser, opt->script_name, f, 1, opt);
|
||||
}
|
||||
ast = rb_ruby_ast_data_get(vast);
|
||||
ast = rb_ruby_ast_data_get(ast_value);
|
||||
if (!ast->body.root) {
|
||||
rb_ast_dispose(ast);
|
||||
return Qnil;
|
||||
}
|
||||
return vast;
|
||||
return ast_value;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2239,7 +2239,7 @@ process_options_global_setup(const ruby_cmdline_options_t *opt, const rb_iseq_t
|
|||
static VALUE
|
||||
process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
||||
{
|
||||
VALUE vast = Qnil;
|
||||
VALUE ast_value = Qnil;
|
||||
struct {
|
||||
rb_ast_t *ast;
|
||||
pm_parse_result_t prism;
|
||||
|
@ -2474,8 +2474,8 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
|||
}
|
||||
|
||||
if (!(*rb_ruby_prism_ptr())) {
|
||||
vast = process_script(opt);
|
||||
if (!(result.ast = rb_ruby_ast_data_get(vast))) return Qfalse;
|
||||
ast_value = process_script(opt);
|
||||
if (!(result.ast = rb_ruby_ast_data_get(ast_value))) return Qfalse;
|
||||
}
|
||||
else {
|
||||
prism_script(opt, &result.prism);
|
||||
|
@ -2557,7 +2557,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
|||
}
|
||||
else {
|
||||
rb_ast_t *ast = result.ast;
|
||||
iseq = rb_iseq_new_main(vast, opt->script_name, path, parent, optimize);
|
||||
iseq = rb_iseq_new_main(ast_value, opt->script_name, path, parent, optimize);
|
||||
rb_ast_dispose(ast);
|
||||
}
|
||||
}
|
||||
|
@ -2608,7 +2608,7 @@ load_file_internal(VALUE argp_v)
|
|||
ruby_cmdline_options_t *opt = argp->opt;
|
||||
VALUE f = argp->f;
|
||||
int line_start = 1;
|
||||
VALUE vast = Qnil;
|
||||
VALUE ast_value = Qnil;
|
||||
rb_encoding *enc;
|
||||
ID set_encoding;
|
||||
|
||||
|
@ -2709,7 +2709,7 @@ load_file_internal(VALUE argp_v)
|
|||
return rb_parser_compile_string_path(parser, orig_fname, f, line_start);
|
||||
}
|
||||
rb_funcall(f, set_encoding, 2, rb_enc_from_encoding(enc), rb_str_new_cstr("-"));
|
||||
vast = rb_parser_compile_file_path(parser, orig_fname, f, line_start);
|
||||
ast_value = rb_parser_compile_file_path(parser, orig_fname, f, line_start);
|
||||
rb_funcall(f, set_encoding, 1, rb_parser_encoding(parser));
|
||||
if (script && rb_parser_end_seen_p(parser)) {
|
||||
/*
|
||||
|
@ -2727,7 +2727,7 @@ load_file_internal(VALUE argp_v)
|
|||
rb_define_global_const("DATA", f);
|
||||
argp->f = Qnil;
|
||||
}
|
||||
return vast;
|
||||
return ast_value;
|
||||
}
|
||||
|
||||
/* disabling O_NONBLOCK, and returns 0 on success, otherwise errno */
|
||||
|
@ -2859,9 +2859,9 @@ rb_load_file(const char *fname)
|
|||
void *
|
||||
rb_load_file_str(VALUE fname_v)
|
||||
{
|
||||
VALUE vast;
|
||||
vast = rb_parser_load_file(rb_parser_new(), fname_v);
|
||||
return (void *)rb_ruby_ast_data_get(vast);
|
||||
VALUE ast_value;
|
||||
ast_value = rb_parser_load_file(rb_parser_new(), fname_v);
|
||||
return (void *)rb_ruby_ast_data_get(ast_value);
|
||||
}
|
||||
|
||||
VALUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue