mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
do not dump_node if parser failed
This commit is contained in:
@@ -5479,7 +5479,10 @@ mrb_parser_parse(parser_state *p, mrbc_context *c)
|
||||
p->lex_strterm = NULL;
|
||||
|
||||
parser_init_cxt(p, c);
|
||||
yyparse(p);
|
||||
if (yyparse(p) != 0 || p->nerr > 0) {
|
||||
p->tree = 0;
|
||||
return;
|
||||
}
|
||||
if (!p->tree) {
|
||||
p->tree = new_nil(p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user