summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 16:21:25 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 16:21:25 +0000
commit4d7b8af1cd72106edfcd3b9e83185cf0ae97d706 (patch)
treea3ba7e12d6a60a638f08f2ea2e78f0666a9c5d73
parenta2688019e5dee985fd25fa0db2699ac7ff17fdd6 (diff)
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
-rw-r--r--parse.y16
1 files changed, 5 insertions, 11 deletions
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