1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
yui-knk 2017-11-13 01:24:15 +00:00
parent 1ef7b0cd5a
commit 43e15e77b9

View file

@ -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;
}