diff options
author | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-13 01:24:15 +0000 |
---|---|---|
committer | yui-knk <yui-knk@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-13 01:24:15 +0000 |
commit | 43e15e77b9939da44372240d261e69fc78abd3c9 (patch) | |
tree | 048fca25ed2af07bc9793df107df2211f7fa7296 | |
parent | 1ef7b0cd5a5717a1f6e18d41b85124fba312010f (diff) |
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
-rw-r--r-- | parse.y | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; } |