ruby-changes:49706
From: mame <ko1@a...>
Date: Sun, 14 Jan 2018 23:44:51 +0900 (JST)
Subject: [ruby-changes:49706] mame:r61823 (trunk): parse.y (parser_heredoc_dedent): Removed
mame 2018-01-14 23:44:46 +0900 (Sun, 14 Jan 2018) New Revision: 61823 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61823 Log: parse.y (parser_heredoc_dedent): Removed Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 61822) +++ parse.y (revision 61823) @@ -440,8 +440,7 @@ static void reg_fragment_setenc(struct p https://github.com/ruby/ruby/blob/trunk/parse.y#L440 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, V https://github.com/ruby/ruby/blob/trunk/parse.y#L709 #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 https://github.com/ruby/ruby/blob/trunk/parse.y#L3628 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 t https://github.com/ruby/ruby/blob/trunk/parse.y#L3638 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) https://github.com/ruby/ruby/blob/trunk/parse.y#L6471 #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_para https://github.com/ruby/ruby/blob/trunk/parse.y#L6503 } #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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/