From 43e15e77b9939da44372240d261e69fc78abd3c9 Mon Sep 17 00:00:00 2001 From: yui-knk Date: Mon, 13 Nov 2017 01:24:15 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- parse.y | 2 ++ 1 file changed, 2 insertions(+) diff --git a/parse.y b/parse.y index d9464e205e..8f44534deb 100644 --- a/parse.y +++ b/parse.y @@ -8888,6 +8888,8 @@ node_newnode(struct parser_params *parser, enum node_type type, VALUE a0, VALUE /* 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; }