ruby-changes:48636
From: yui-knk <ko1@a...>
Date: Mon, 13 Nov 2017 10:24:22 +0900 (JST)
Subject: [ruby-changes:48636] yui-knk:r60751 (trunk): Initialize last column with -1 and lineno with 0
yui-knk 2017-11-13 10:24:15 +0900 (Mon, 13 Nov 2017) New Revision: 60751 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60751 Log: Initialize last column with -1 and lineno with 0 * parse.y (node_newnode): Initialize last column of nodes with -1 and lineno with 0 to make it easy to detect nodes which we forget to set a column number or lineno. Modified files: trunk/parse.y Index: parse.y =================================================================== --- parse.y (revision 60750) +++ parse.y (revision 60751) @@ -8888,6 +8888,8 @@ node_newnode(struct parser_params *parse https://github.com/ruby/ruby/blob/trunk/parse.y#L8888 /* mark not cared lineno to 0 and column to -1 */ nd_set_lineno(n, 0); nd_set_column(n, -1); + nd_set_last_lineno(n, 0); + nd_set_last_column(n, -1); return n; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/