1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

parse.y (yycompile0): check if accepted

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-01-20 01:24:15 +00:00
parent c151679cc3
commit 76b609c8c3

View file

@ -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);