aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-26 08:29:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-26 08:29:22 +0000
commitc55e5e90967cd8433e7a00a800091e0c2aab7928 (patch)
treee4dca316331f2014bd1d0f3e49cfe64df81253ca /parse.y
parentcf35c7cfcc17765b4eafbdcf340948f64f5344b9 (diff)
downloadruby-c55e5e90967cd8433e7a00a800091e0c2aab7928.tar.gz
parse.y: new_string1
* parse.y (new_string1): extract from the rule. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 3 insertions, 5 deletions
diff --git a/parse.y b/parse.y
index 92bf2ca3d1..0d0fd191b5 100644
--- a/parse.y
+++ b/parse.y
@@ -506,6 +506,7 @@ static NODE *new_regexp_gen(struct parser_params *, NODE *, int);
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 parser_params *, VALUE, VALUE);
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 tSTRING_END
{
heredoc_dedent($2);
heredoc_indent = 0;
- /*%%%*/
- $$ = $2;
- /*%
- $$ = dispatch1(string_literal, $2);
- %*/
+ $$ = new_string1($2);
}
;