mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Fixed a bug in mirb heredoc handling; fix #3989
This commit is contained in:
@@ -143,7 +143,6 @@ struct mrb_parser_state {
|
||||
mrb_ast_node *heredocs_from_nextline;
|
||||
mrb_ast_node *parsing_heredoc;
|
||||
mrb_ast_node *lex_strterm_before_heredoc;
|
||||
mrb_bool heredoc_end_now:1; /* for mirb */
|
||||
|
||||
void *ylval;
|
||||
|
||||
|
||||
@@ -126,10 +126,6 @@ is_code_block_open(struct mrb_parser_state *parser)
|
||||
|
||||
/* check for heredoc */
|
||||
if (parser->parsing_heredoc != NULL) return TRUE;
|
||||
if (parser->heredoc_end_now) {
|
||||
parser->heredoc_end_now = FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* check for unterminated string */
|
||||
if (parser->lex_strterm) return TRUE;
|
||||
|
||||
@@ -1078,7 +1078,6 @@ heredoc_end(parser_state *p)
|
||||
end_strterm(p);
|
||||
p->lex_strterm = p->lex_strterm_before_heredoc;
|
||||
p->lex_strterm_before_heredoc = NULL;
|
||||
p->heredoc_end_now = TRUE;
|
||||
}
|
||||
else {
|
||||
/* next heredoc */
|
||||
|
||||
Reference in New Issue
Block a user