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

ruby-changes:49870

From: mame <ko1@a...>
Date: Sun, 21 Jan 2018 01:32:01 +0900 (JST)
Subject: [ruby-changes:49870] mame:r61987 (trunk): parse.y: Remove double meaning of new_xstring/new_string1

mame	2018-01-21 01:21:25 +0900 (Sun, 21 Jan 2018)

  New Revision: 61987

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

  Log:
    parse.y: Remove double meaning of new_xstring/new_string1

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61986)
+++ parse.y	(revision 61987)
@@ -422,7 +422,6 @@ static NODE *new_regexp(struct parser_pa https://github.com/ruby/ruby/blob/trunk/parse.y#L422
 #define make_array(ary, loc) ((ary) ? (nd_set_loc(ary, loc), ary) : NEW_ZARRAY(loc))
 
 static NODE *new_xstring(struct parser_params *, NODE *, const YYLTYPE *loc);
-#define new_string1(str) (str)
 
 static NODE *symbol_append(struct parser_params *p, NODE *symbols, NODE *symbol);
 
@@ -484,9 +483,6 @@ static VALUE new_attr_op_assign(struct p https://github.com/ruby/ruby/blob/trunk/parse.y#L483
 
 static VALUE new_regexp(struct parser_params *, VALUE, VALUE, const YYLTYPE *);
 
-static VALUE new_xstring(struct parser_params *, VALUE, const YYLTYPE *);
-#define new_string1(str) dispatch1(string_literal, str)
-
 static VALUE const_decl(struct parser_params *p, VALUE path);
 
 static VALUE var_field(struct parser_params *p, VALUE a);
@@ -3303,16 +3299,20 @@ string		: tCHAR https://github.com/ruby/ruby/blob/trunk/parse.y#L3299
 
 string1		: tSTRING_BEG string_contents tSTRING_END
 		    {
-			$$ = new_string1(heredoc_dedent(p, $2));
 		    /*%%%*/
+			$$ = heredoc_dedent(p, $2);
 			if ($$) nd_set_loc($$, &@$);
 		    /*% %*/
+		    /*% ripper: string_literal!(heredoc_dedent(p, $2)) %*/
 		    }
 		;
 
 xstring		: tXSTRING_BEG xstring_contents tSTRING_END
 		    {
+		    /*%%%*/
 			$$ = new_xstring(p, heredoc_dedent(p, $2), &@$);
+		    /*% %*/
+		    /*% ripper: xstring_literal!(heredoc_dedent(p, $2)) %*/
 		    }
 		;
 
@@ -8757,12 +8757,6 @@ new_regexp(struct parser_params *p, VALU https://github.com/ruby/ruby/blob/trunk/parse.y#L8757
     }
     return dispatch2(regexp_literal, re, opt);
 }
-
-static VALUE
-new_xstring(struct parser_params *p, VALUE str, const YYLTYPE *loc)
-{
-    return dispatch1(xstring_literal, str);
-}
 #endif /* !RIPPER */
 
 #ifndef RIPPER

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

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