From 5c0748b627e000120b4fdcdf114cd666be49fe72 Mon Sep 17 00:00:00 2001 From: mame Date: Sun, 14 Jan 2018 14:44:46 +0000 Subject: [PATCH] parse.y (parser_heredoc_dedent): Removed git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/parse.y b/parse.y index 8e2a2a4aa8..434e52e530 100644 --- a/parse.y +++ b/parse.y @@ -440,8 +440,7 @@ static void reg_fragment_setenc(struct parser_params*, VALUE, int); static int reg_fragment_check(struct parser_params*, VALUE, int); static NODE *reg_named_capture_assign(struct parser_params* p, VALUE regexp, const YYLTYPE *loc); -static NODE *parser_heredoc_dedent(struct parser_params*,NODE*); -# define heredoc_dedent(str) parser_heredoc_dedent(p, (str)) +static NODE *heredoc_dedent(struct parser_params*,NODE*); #define get_id(id) (id) #define get_value(val) (val) @@ -710,8 +709,7 @@ new_args_tail(struct parser_params *p, VALUE k, VALUE kr, VALUE b, YYLTYPE *loc) #define new_defined(p,expr,loc) dispatch1(defined, (expr)) -static VALUE parser_heredoc_dedent(struct parser_params*,VALUE); -# define heredoc_dedent(str) parser_heredoc_dedent(p, (str)) +static VALUE heredoc_dedent(struct parser_params*,VALUE); #else #define ID2VAL(id) ((VALUE)(id)) @@ -3630,7 +3628,7 @@ string : tCHAR string1 : tSTRING_BEG string_contents tSTRING_END { - $$ = new_string1(heredoc_dedent($2)); + $$ = new_string1(heredoc_dedent(p, $2)); /*%%%*/ if ($$) nd_set_loc($$, &@$); /*% @@ -3640,7 +3638,7 @@ string1 : tSTRING_BEG string_contents tSTRING_END xstring : tXSTRING_BEG xstring_contents tSTRING_END { - $$ = new_xstring(p, heredoc_dedent($2), &@$); + $$ = new_xstring(p, heredoc_dedent(p, $2), &@$); } ; @@ -6473,7 +6471,7 @@ dedent_string(VALUE string, int width) #ifndef RIPPER static NODE * -parser_heredoc_dedent(struct parser_params *p, NODE *root) +heredoc_dedent(struct parser_params *p, NODE *root) { NODE *node, *str_node; int bol = TRUE; @@ -6505,7 +6503,7 @@ parser_heredoc_dedent(struct parser_params *p, NODE *root) } #else /* RIPPER */ static VALUE -parser_heredoc_dedent(struct parser_params *p, VALUE array) +heredoc_dedent(struct parser_params *p, VALUE array) { int indent = p->heredoc_indent;