From 52057336b7f425a9d336ff9909df3d57b39e8971 Mon Sep 17 00:00:00 2001 From: mame Date: Mon, 8 Jan 2018 12:56:58 +0000 Subject: 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 --- node.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'node.c') 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 { -- cgit v1.2.1