@@ -64,8 +64,8 @@ ast_new_internal(rb_ast_t *ast, const NODE *node)
6464 return obj ;
6565}
6666
67- static VALUE rb_ast_parse_str (VALUE str , VALUE save_script_lines );
68- static VALUE rb_ast_parse_file (VALUE path , VALUE save_script_lines );
67+ static VALUE rb_ast_parse_str (VALUE str , VALUE keep_script_lines );
68+ static VALUE rb_ast_parse_file (VALUE path , VALUE keep_script_lines );
6969
7070static VALUE
7171ast_parse_new (void )
@@ -85,31 +85,31 @@ ast_parse_done(rb_ast_t *ast)
8585}
8686
8787static VALUE
88- ast_s_parse (rb_execution_context_t * ec , VALUE module , VALUE str , VALUE save_script_lines )
88+ ast_s_parse (rb_execution_context_t * ec , VALUE module , VALUE str , VALUE keep_script_lines )
8989{
90- return rb_ast_parse_str (str , save_script_lines );
90+ return rb_ast_parse_str (str , keep_script_lines );
9191}
9292
9393static VALUE
94- rb_ast_parse_str (VALUE str , VALUE save_script_lines )
94+ rb_ast_parse_str (VALUE str , VALUE keep_script_lines )
9595{
9696 rb_ast_t * ast = 0 ;
9797
9898 StringValue (str );
9999 VALUE vparser = ast_parse_new ();
100- if (RTEST (save_script_lines )) rb_parser_save_script_lines (vparser );
100+ if (RTEST (keep_script_lines )) rb_parser_keep_script_lines (vparser );
101101 ast = rb_parser_compile_string_path (vparser , Qnil , str , 1 );
102102 return ast_parse_done (ast );
103103}
104104
105105static VALUE
106- ast_s_parse_file (rb_execution_context_t * ec , VALUE module , VALUE path , VALUE save_script_lines )
106+ ast_s_parse_file (rb_execution_context_t * ec , VALUE module , VALUE path , VALUE keep_script_lines )
107107{
108- return rb_ast_parse_file (path , save_script_lines );
108+ return rb_ast_parse_file (path , keep_script_lines );
109109}
110110
111111static VALUE
112- rb_ast_parse_file (VALUE path , VALUE save_script_lines )
112+ rb_ast_parse_file (VALUE path , VALUE keep_script_lines )
113113{
114114 VALUE f ;
115115 rb_ast_t * ast = 0 ;
@@ -119,7 +119,7 @@ rb_ast_parse_file(VALUE path, VALUE save_script_lines)
119119 f = rb_file_open_str (path , "r" );
120120 rb_funcall (f , rb_intern ("set_encoding" ), 2 , rb_enc_from_encoding (enc ), rb_str_new_cstr ("-" ));
121121 VALUE vparser = ast_parse_new ();
122- if (RTEST (save_script_lines )) rb_parser_save_script_lines (vparser );
122+ if (RTEST (keep_script_lines )) rb_parser_keep_script_lines (vparser );
123123 ast = rb_parser_compile_file_path (vparser , Qnil , f , 1 );
124124 rb_io_close (f );
125125 return ast_parse_done (ast );
@@ -139,13 +139,13 @@ lex_array(VALUE array, int index)
139139}
140140
141141static VALUE
142- rb_ast_parse_array (VALUE array , VALUE save_script_lines )
142+ rb_ast_parse_array (VALUE array , VALUE keep_script_lines )
143143{
144144 rb_ast_t * ast = 0 ;
145145
146146 array = rb_check_array_type (array );
147147 VALUE vparser = ast_parse_new ();
148- if (RTEST (save_script_lines )) rb_parser_save_script_lines (vparser );
148+ if (RTEST (keep_script_lines )) rb_parser_keep_script_lines (vparser );
149149 ast = rb_parser_compile_generic (vparser , lex_array , Qnil , array , 1 );
150150 return ast_parse_done (ast );
151151}
@@ -193,7 +193,7 @@ script_lines(VALUE path)
193193}
194194
195195static VALUE
196- ast_s_of (rb_execution_context_t * ec , VALUE module , VALUE body , VALUE save_script_lines )
196+ ast_s_of (rb_execution_context_t * ec , VALUE module , VALUE body , VALUE keep_script_lines )
197197{
198198 VALUE path , node , lines ;
199199 int node_id ;
@@ -221,13 +221,13 @@ ast_s_of(rb_execution_context_t *ec, VALUE module, VALUE body, VALUE save_script
221221 }
222222
223223 if (!NIL_P (lines = script_lines (path ))) {
224- node = rb_ast_parse_array (lines , save_script_lines );
224+ node = rb_ast_parse_array (lines , keep_script_lines );
225225 }
226226 else if (RSTRING_LEN (path ) == 2 && memcmp (RSTRING_PTR (path ), "-e" , 2 ) == 0 ) {
227- node = rb_ast_parse_str (rb_e_script , save_script_lines );
227+ node = rb_ast_parse_str (rb_e_script , keep_script_lines );
228228 }
229229 else {
230- node = rb_ast_parse_file (path , save_script_lines );
230+ node = rb_ast_parse_file (path , keep_script_lines );
231231 }
232232
233233 return node_find (node , node_id );
0 commit comments