mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
parse.y: fix nested here-document bug; fix #5607
- remove `lex_strterm_before_heredoc` that does not nest - remove `all_heredocs` that cannot distinguish nested and followed here-doc - replace `lex_strterm` represented by cons list by C struct - push/pop `lex_strterm` before/after interpolation
This commit is contained in:
@@ -127,7 +127,7 @@ struct mrb_parser_state {
|
||||
int column;
|
||||
|
||||
enum mrb_lex_state_enum lstate;
|
||||
mrb_ast_node *lex_strterm; /* (type nest_level beg . end) */
|
||||
struct parser_lex_strterm *lex_strterm;
|
||||
|
||||
unsigned int cond_stack;
|
||||
unsigned int cmdarg_stack;
|
||||
@@ -143,10 +143,8 @@ struct mrb_parser_state {
|
||||
int tidx;
|
||||
int tsiz;
|
||||
|
||||
mrb_ast_node *all_heredocs; /* list of mrb_parser_heredoc_info* */
|
||||
mrb_ast_node *heredocs_from_nextline;
|
||||
mrb_ast_node *parsing_heredoc;
|
||||
mrb_ast_node *lex_strterm_before_heredoc;
|
||||
|
||||
void *ylval;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user