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

ruby-changes:40444

From: nobu <ko1@a...>
Date: Tue, 10 Nov 2015 18:42:54 +0900 (JST)
Subject: [ruby-changes:40444] nobu:r52525 (trunk): Rename DOTQ to ANDDOT

nobu	2015-11-10 18:42:27 +0900 (Tue, 10 Nov 2015)

  New Revision: 52525

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

  Log:
    Rename DOTQ to ANDDOT
    
    * defs/id.def, parse.y: Switch internal token name to reflect
      current form of safe-call operator.  [Fix GH-1090]

  Modified files:
    trunk/ChangeLog
    trunk/defs/id.def
    trunk/ext/ripper/eventids2.c
    trunk/parse.y
Index: defs/id.def
===================================================================
--- defs/id.def	(revision 52524)
+++ defs/id.def	(revision 52525)
@@ -98,7 +98,7 @@ token_ops = %[\ https://github.com/ruby/ruby/blob/trunk/defs/id.def#L98
   COLON3        ::
   ANDOP         &&
   OROP          ||
-  DOTQ          &.
+  ANDDOT        &.
 ]
 
 class KeywordError < RuntimeError
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 52524)
+++ ChangeLog	(revision 52525)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Nov 10 18:42:24 2015  Aleksandrs Ledovskis  <aleksandrs@l...>
+
+	* defs/id.def, parse.y: Switch internal token name to reflect
+	  current form of safe-call operator.  [Fix GH-1090]
+
 Tue Nov 10 18:25:56 2015  Nobuyoshi Nakada  <nobu@r...>
 
 	* hash.c (rb_hash_to_proc): use rb_func_proc_new to make light
Index: parse.y
===================================================================
--- parse.y	(revision 52524)
+++ parse.y	(revision 52525)
@@ -371,7 +371,7 @@ static int parser_yyerror(struct parser_ https://github.com/ruby/ruby/blob/trunk/parse.y#L371
 #define ruby_coverage		(parser->coverage)
 #endif
 
-#define CALL_Q_P(q) ((q) == tDOTQ)
+#define CALL_Q_P(q) ((q) == tANDDOT)
 #define NODE_CALL_Q(q) (CALL_Q_P(q) ? NODE_QCALL : NODE_CALL)
 #define NEW_QCALL(q,r,m,a) NEW_NODE(NODE_CALL_Q(q),r,m,a)
 
@@ -875,7 +875,7 @@ static void token_info_pop(struct parser https://github.com/ruby/ruby/blob/trunk/parse.y#L875
 %token tASET		RUBY_TOKEN(ASET)   "[]="
 %token tLSHFT		RUBY_TOKEN(LSHFT)  "<<"
 %token tRSHFT		RUBY_TOKEN(RSHFT)  ">>"
-%token tDOTQ		RUBY_TOKEN(DOTQ)   "&."
+%token tANDDOT		RUBY_TOKEN(ANDDOT) "&."
 %token tCOLON2		"::"
 %token tCOLON3		":: at EXPR_BEG"
 %token <id> tOP_ASGN	/* +=, -=  etc. */
@@ -5117,12 +5117,12 @@ call_op 	: '.' https://github.com/ruby/ruby/blob/trunk/parse.y#L5117
 		        $$ = ripper_id2sym('.');
 		    %*/
 		    }
-		| tDOTQ
+		| tANDDOT
 		    {
 		    /*%%%*/
-			$$ = tDOTQ;
+			$$ = tANDDOT;
 		    /*%
-		        $$ = ripper_id2sym(idDOTQ);
+		        $$ = ripper_id2sym(idANDDOT);
 		    %*/
 		    }
 		;
@@ -8278,7 +8278,7 @@ parser_yylex(struct parser_params *parse https://github.com/ruby/ruby/blob/trunk/parse.y#L8278
 	}
 	else if (c == '.') {
 	    lex_state = EXPR_DOT;
-	    return tDOTQ;
+	    return tANDDOT;
 	}
 	pushback(c);
 	if (IS_SPCARG(c)) {
Index: ext/ripper/eventids2.c
===================================================================
--- ext/ripper/eventids2.c	(revision 52524)
+++ ext/ripper/eventids2.c	(revision 52525)
@@ -257,7 +257,7 @@ static const struct token_assoc { https://github.com/ruby/ruby/blob/trunk/ext/ripper/eventids2.c#L257
     {tRSHFT,			O(op)},
     {tSTAR,			O(op)},
     {tDSTAR,			O(op)},
-    {tDOTQ,			O(op)},
+    {tANDDOT,			O(op)},
     {tSTRING_BEG,		O(tstring_beg)},
     {tSTRING_CONTENT,		O(tstring_content)},
     {tSTRING_DBEG,		O(embexpr_beg)},

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

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