[前][次][番号順一覧][スレッド一覧]

ruby-changes:49852

From: nobu <ko1@a...>
Date: Sat, 20 Jan 2018 10:24:20 +0900 (JST)
Subject: [ruby-changes:49852] nobu:r61970 (trunk): parse.y (yycompile0): check if accepted

nobu	2018-01-20 10:24:15 +0900 (Sat, 20 Jan 2018)

  New Revision: 61970

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61970

  Log:
    parse.y (yycompile0): check if accepted

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61969)
+++ parse.y	(revision 61970)
@@ -4758,7 +4758,7 @@ yycompile0(VALUE arg) https://github.com/ruby/ruby/blob/trunk/parse.y#L4758
 	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) https://github.com/ruby/ruby/blob/trunk/parse.y#L4766
     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);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]