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

ruby-changes:43939

From: nobu <ko1@a...>
Date: Fri, 26 Aug 2016 17:39:04 +0900 (JST)
Subject: [ruby-changes:43939] nobu:r56012 (trunk): parse.y: new_string1

nobu	2016-08-26 17:29:22 +0900 (Fri, 26 Aug 2016)

  New Revision: 56012

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

  Log:
    parse.y: new_string1
    
    * parse.y (new_string1): extract from the rule.

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 56011)
+++ parse.y	(revision 56012)
@@ -506,6 +506,7 @@ static NODE *new_regexp_gen(struct parse https://github.com/ruby/ruby/blob/trunk/parse.y#L506
 
 static NODE *new_xstring_gen(struct parser_params *, NODE *);
 #define new_xstring(node) new_xstring_gen(parser, node)
+#define new_string1(str) (str)
 
 static NODE *match_op_gen(struct parser_params*,NODE*,NODE*);
 #define match_op(node1,node2) match_op_gen(parser, (node1), (node2))
@@ -569,6 +570,7 @@ static VALUE new_regexp_gen(struct parse https://github.com/ruby/ruby/blob/trunk/parse.y#L570
 
 static VALUE new_xstring_gen(struct parser_params *, VALUE);
 #define new_xstring(str) new_xstring_gen(parser, str)
+#define new_string1(str) dispatch1(string_literal, str)
 
 #define const_path_field(w, n) dispatch2(const_path_field, (w), (n))
 #define top_const_field(n) dispatch1(top_const_field, (n))
@@ -3894,11 +3896,7 @@ string1		: tSTRING_BEG string_contents t https://github.com/ruby/ruby/blob/trunk/parse.y#L3896
 		    {
 			heredoc_dedent($2);
 			heredoc_indent = 0;
-		    /*%%%*/
-			$$ = $2;
-		    /*%
-			$$ = dispatch1(string_literal, $2);
-		    %*/
+			$$ = new_string1($2);
 		    }
 		;
 

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

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