From 4d7b8af1cd72106edfcd3b9e83185cf0ae97d706 Mon Sep 17 00:00:00 2001 From: mame Date: Sat, 20 Jan 2018 16:21:25 +0000 Subject: parse.y: Remove double meaning of new_xstring/new_string1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'parse.y') diff --git a/parse.y b/parse.y index f9a05d4225..1fd022d1a0 100644 --- a/parse.y +++ b/parse.y @@ -422,7 +422,6 @@ static NODE *new_regexp(struct parser_params *, NODE *, int, const YYLTYPE *); #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 parser_params *p, VALUE lhs, VALUE type, 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 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, VALUE re, VALUE opt, const YYLTYPE *loc) } 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 -- cgit v1.2.3