summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 08:45:35 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-09 08:45:35 +0000
commit4928900814725b6682c7aae5cf02ed60b3b32e57 (patch)
tree8782be452b1543d4f465915a333a2e1d2c32c4e3 /node.c
parent043e1fd559f0675b242cd50fe82256083e3257db (diff)
Rename code_range to code_location
Because the name "code_range" is ambiguous with encoding's. Abbreviations ("crange", and "cr") are also renamed to "loc". The traditional "code_location" (a pair of lineno and column) is renamed to "code_position". Abbreviations are also renamed (first_loc to beg_pos, and last_loc to end_pos). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/node.c b/node.c
index 1704fcaff4..a5c04aa5fd 100644
--- a/node.c
+++ b/node.c
@@ -23,7 +23,7 @@
#define A_LONG(val) rb_str_catf(buf, "%ld", (val))
#define A_LIT(lit) AR(rb_inspect(lit))
#define A_NODE_HEADER(node, term) \
- rb_str_catf(buf, "@ %s (line: %d, code_range: (%d,%d)-(%d,%d))%s"term, \
+ rb_str_catf(buf, "@ %s (line: %d, location: (%d,%d)-(%d,%d))%s"term, \
ruby_node_name(nd_type(node)), nd_line(node), \
nd_first_lineno(node), nd_first_column(node), \
nd_last_lineno(node), nd_last_column(node), \
@@ -1026,10 +1026,10 @@ rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2)
n->u1.value = a0;
n->u2.value = a1;
n->u3.value = a2;
- n->nd_crange.first_loc.lineno = 0;
- n->nd_crange.first_loc.column = 0;
- n->nd_crange.last_loc.lineno = 0;
- n->nd_crange.last_loc.column = 0;
+ n->nd_loc.beg_pos.lineno = 0;
+ n->nd_loc.beg_pos.column = 0;
+ n->nd_loc.end_pos.lineno = 0;
+ n->nd_loc.end_pos.column = 0;
}
typedef struct node_buffer_elem_struct {