summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-04 15:22:18 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-04 15:22:18 +0000
commit0ee24acb5a9f3007f3b62f04c69427f61d57e04e (patch)
treec13881daa5fb035ca86261114564ee7b236b8107 /node.c
parent9533da6f1f306491858ba12fc630171e6ad97ae7 (diff)
Introduce `rb_code_location_t`
`rb_code_location_t` has two integers, lineno and column, which point to one location on a code. Now `rb_code_location_t` is used instead of `VALUE nd_location`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/node.c b/node.c
index 48fdf03c0a..885cef6c04 100644
--- a/node.c
+++ b/node.c
@@ -1058,11 +1058,12 @@ void
rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
{
n->flags = T_NODE;
- n->nd_location = 0;
+ nd_set_type(n, type);
n->u1.value = a0;
n->u2.value = a1;
n->u3.value = a2;
- nd_set_type(n, type);
+ n->nd_first_loc.lineno = 0;
+ n->nd_first_loc.column = 0;
}
typedef struct node_buffer_elem_struct {