diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-20 01:24:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-20 01:24:15 +0000 |
commit | 76b609c8c3d4cae09e619aeee6ee5743a498fd3d (patch) | |
tree | 4062a80baabb5bfc07133927050338956f72e679 /parse.y | |
parent | c151679cc3fba31952109b39747efc7aa66b57fa (diff) |
parse.y (yycompile0): check if accepted
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4758,7 +4758,7 @@ yycompile0(VALUE arg) RUBY_DTRACE_PARSE_##name(p->ruby_sourcefile, p->ruby_sourceline); \ } RUBY_DTRACE_PARSE_HOOK(BEGIN); - n = yyparse((void*)p); + n = yyparse(p); RUBY_DTRACE_PARSE_HOOK(END); p->debug_lines = 0; p->coverage = 0; @@ -4766,7 +4766,7 @@ yycompile0(VALUE arg) p->lex.strterm = 0; p->lex.pcur = p->lex.pbeg = p->lex.pend = 0; p->lex.prevline = p->lex.lastline = p->lex.nextline = 0; - if (p->error_p) { + if (n || p->error_p) { VALUE mesg = p->error_buffer; if (!mesg) { mesg = rb_class_new_instance(0, 0, rb_eSyntaxError); |