[前][次][番号順一覧][スレッド一覧]

ruby-changes:49508

From: mame <ko1@a...>
Date: Sat, 6 Jan 2018 01:04:05 +0900 (JST)
Subject: [ruby-changes:49508] mame:r61623 (trunk): parse.y: Use nd_set_loc instead of direct modification to nd_loc

mame	2018-01-06 01:04:02 +0900 (Sat, 06 Jan 2018)

  New Revision: 61623

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61623

  Log:
    parse.y: Use nd_set_loc instead of direct modification to nd_loc

  Modified files:
    trunk/parse.y
Index: parse.y
===================================================================
--- parse.y	(revision 61622)
+++ parse.y	(revision 61623)
@@ -3951,7 +3951,7 @@ strings		: string https://github.com/ruby/ruby/blob/trunk/parse.y#L3951
 string		: tCHAR
 		    {
 		    /*%%%*/
-			$$->nd_loc = @$;
+			nd_set_loc($$, &@$);
 		    /*%
 		    %*/
 		    }
@@ -4101,7 +4101,7 @@ qword_list	: /* none */ https://github.com/ruby/ruby/blob/trunk/parse.y#L4101
 		| qword_list tSTRING_CONTENT ' '
 		    {
 		    /*%%%*/
-			$2->nd_loc = @2;
+			nd_set_loc($2, &@2);
 			$$ = list_append($1, $2);
 		    /*%
 			$$ = dispatch2(qwords_add, $1, $2);
@@ -4124,7 +4124,7 @@ qsym_list	: /* none */ https://github.com/ruby/ruby/blob/trunk/parse.y#L4124
 			lit = $2->nd_lit;
 			nd_set_type($2, NODE_LIT);
 			add_mark_object($2->nd_lit = ID2SYM(rb_intern_str(lit)));
-			$2->nd_loc = @2;
+			nd_set_loc($2, &@2);
 			$$ = list_append($1, $2);
 		    /*%
 			$$ = dispatch2(qsymbols_add, $1, $2);
@@ -4220,7 +4220,7 @@ regexp_contents: /* none */ https://github.com/ruby/ruby/blob/trunk/parse.y#L4220
 string_content	: tSTRING_CONTENT
 		    {
 		    /*%%%*/
-			$$->nd_loc = @$;
+			nd_set_loc($$, &@$);
 		    /*%
 		    %*/
 		    }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]