1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Introduce rb_code_range_t and replace YYLTYPE with it

rb_code_range_t has two t_code_location_t, i.e., the first and last
locations.

This is used for YYLTYPE, tracked locations of bison, and will be also
used for representing the "range", the first and the last locations of
each NODE.  Currently, each NODE keeps only the first location, though.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2017-11-04 16:34:00 +00:00
parent 39a73cac71
commit a9fd7d9396
2 changed files with 663 additions and 792 deletions

5
node.h
View file

@ -227,6 +227,11 @@ typedef struct rb_code_location_struct {
int column;
} rb_code_location_t;
typedef struct rb_code_range_struct {
rb_code_location_t first_loc;
rb_code_location_t last_loc;
} rb_code_range_t;
typedef struct RNode {
VALUE flags;
union {

1450
parse.y

File diff suppressed because it is too large Load diff