mirror of
https://github.com/ruby/ruby.git
synced 2025-08-16 05:59:00 +02:00
Make lastline and nextline to be rb_parser_string
This commit changes `struct parser_params` lastline and nextline from `VALUE` (String object) to `rb_parser_string_t *` so that dependency on Ruby Object is reduced. `parser_string_buffer_t string_buffer` is added to `struct parser_params` to manage `rb_parser_string_t` pointers of each line. All allocated line strings are freed in `rb_ruby_parser_free`.
This commit is contained in:
parent
706eea9d3c
commit
ee7f63ebba
5 changed files with 158 additions and 49 deletions
|
@ -72,6 +72,10 @@ enum lex_state_e {
|
|||
EXPR_NONE = 0
|
||||
};
|
||||
|
||||
RUBY_SYMBOL_EXPORT_BEGIN
|
||||
VALUE rb_str_new_parser_string(rb_parser_string_t *str);
|
||||
RUBY_SYMBOL_EXPORT_END
|
||||
|
||||
VALUE rb_node_sym_string_val(const NODE *);
|
||||
VALUE rb_node_line_lineno_val(const NODE *);
|
||||
VALUE rb_node_file_path_val(const NODE *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue