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

ruby-changes:55017

From: nobu <ko1@a...>
Date: Tue, 12 Mar 2019 13:11:47 +0900 (JST)
Subject: [ruby-changes:55017] nobu:r67224 (trunk): Flush erred token

nobu	2019-03-12 13:11:41 +0900 (Tue, 12 Mar 2019)

  New Revision: 67224

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

  Log:
    Flush erred token

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 67223)
+++ parse.y	(revision 67224)
@@ -4676,6 +4676,7 @@ parser_yyerror(struct parser_params *p, https://github.com/ruby/ruby/blob/trunk/parse.y#L4676
     if (!yylloc) {
 	RUBY_SET_YYLLOC(current);
 	yylloc = &current;
+	token_flush(p);
     }
     else if ((p->ruby_sourceline != yylloc->beg_pos.lineno &&
 	      p->ruby_sourceline != yylloc->end_pos.lineno) ||
@@ -4765,6 +4766,7 @@ parser_yyerror(struct parser_params *p, https://github.com/ruby/ruby/blob/trunk/parse.y#L4766
 #else
     dispatch1(parse_error, STR_NEW2(msg));
     ripper_error(p);
+    token_flush(p);
 #endif /* !RIPPER */
     return 0;
 }
@@ -11195,6 +11197,7 @@ parser_compile_error(struct parser_param https://github.com/ruby/ruby/blob/trunk/parse.y#L11197
 			       rb_long2int(p->lex.pcur - p->lex.pbeg),
 			       p->enc, fmt, ap);
     va_end(ap);
+    token_flush(p);
 }
 
 static size_t

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

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