aboutsummaryrefslogtreecommitdiffstats
path: root/node.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-08 12:30:35 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-08 12:30:35 +0000
commit47cf2fd7ec0b0deafe209b92f94452e64869b25c (patch)
tree914cceb5169c17f2dc40dcdccd836f023727b0fc /node.h
parentdab956b7e66badf0ead4a74d36f3618510bf0aad (diff)
downloadruby-47cf2fd7ec0b0deafe209b92f94452e64869b25c.tar.gz
parse.y: Factor out code fragments that merges two code ranges
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'node.h')
-rw-r--r--node.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/node.h b/node.h
index b18d96357a..0a2fe4f3ed 100644
--- a/node.h
+++ b/node.h
@@ -232,6 +232,14 @@ typedef struct rb_code_range_struct {
rb_code_location_t last_loc;
} rb_code_range_t;
+static inline rb_code_range_t code_range_gen(rb_code_range_t *cr1, rb_code_range_t *cr2)
+{
+ rb_code_range_t cr;
+ cr.first_loc = cr1->first_loc;
+ cr.last_loc = cr2->last_loc;
+ return cr;
+}
+
typedef struct RNode {
VALUE flags;
union {