зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
a2688019e5
Коммит
4d7b8af1cd
16
parse.y
16
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче