From 4928900814725b6682c7aae5cf02ed60b3b32e57 Mon Sep 17 00:00:00 2001 From: mame Date: Tue, 9 Jan 2018 08:45:35 +0000 Subject: 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 --- node.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'node.c') 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 { -- cgit v1.2.3