Permalink
Browse files

do not dump_node if parser failed

  • Loading branch information...
matz committed Nov 11, 2016
1 parent 185dad3 commit 752ca514f6e3d9435a8af345fa2481e733a5ddca
Showing with 4 additions and 1 deletion.
  1. +4 −1 mrbgems/mruby-compiler/core/parse.y
@@ -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);
}

0 comments on commit 752ca51

Please sign in to comment.