summaryrefslogtreecommitdiff
path: root/node.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-08 12:56:58 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-08 12:56:58 +0000
commit52057336b7f425a9d336ff9909df3d57b39e8971 (patch)
treea737082865feef2d98a3dad77a36044dae9aebc4 /node.c
parent991c45c56e01d92a8c8be7a5654d7071c30917a5 (diff)
parse.y: Make consistent with the terms about code ranges and locations
"loc" was ambiguous; it might refer both a location and a code range. This change uses "loc" for a location, and "crange" or "cr" for a code range. A location (abbr. loc) is a point in a program and consists of line number and column number. A code range (abbr. crange and cr) is a range within a program and consists of a pair of locations which is the first and the last. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61690 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.c')
-rw-r--r--node.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/node.c b/node.c
index abaaf19c7d..d8166a3cd6 100644
--- a/node.c
+++ b/node.c
@@ -1038,10 +1038,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_loc.first_loc.lineno = 0;
- n->nd_loc.first_loc.column = 0;
- n->nd_loc.last_loc.lineno = 0;
- n->nd_loc.last_loc.column = 0;
+ 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;
}
typedef struct node_buffer_elem_struct {