diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-07-29 15:43:20 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-08-20 12:26:02 +0900 |
commit | 995b4c329b7ef7c9c8eda04e611884ce0b37e243 () | |
tree | a1ef7a74f84f9d2ebc96e9cd2dace1e49699506b /rubyparser.h | |
parent | edd3fc621300a9a257947ff6e06aabcbcb547459 (diff) |
Make same structures same
Notes: Merged: https://.com/ruby/ruby/pull/11411
-rw-r--r-- | rubyparser.h | 84 |
1 files changed, 13 insertions, 71 deletions
@@ -315,37 +315,20 @@ typedef struct RNode_IN { struct RNode *nd_next; } rb_node_in_t; -/* RNode_WHILE and RNode_UNTIL should be same structure */ -typedef struct RNode_WHILE { NODE node; struct RNode *nd_cond; struct RNode *nd_body; long nd_state; -} rb_node_while_t; -typedef struct RNode_UNTIL { - NODE node; - - struct RNode *nd_cond; - struct RNode *nd_body; - long nd_state; -} rb_node_until_t; - -/* RNode_ITER and RNode_FOR should be same structure */ typedef struct RNode_ITER { NODE node; struct RNode *nd_body; struct RNode *nd_iter; -} rb_node_iter_t; - -typedef struct RNode_FOR { - NODE node; - - struct RNode *nd_body; - struct RNode *nd_iter; -} rb_node_for_t; typedef struct RNode_FOR_MASGN { NODE node; @@ -353,26 +336,12 @@ typedef struct RNode_FOR_MASGN { struct RNode *nd_var; } rb_node_for_masgn_t; -/* RNode_BREAK, RNode_NEXT and RNode_REDO should be same structure */ -typedef struct RNode_BREAK { NODE node; struct RNode *nd_chain; struct RNode *nd_stts; -} rb_node_break_t; - -typedef struct RNode_NEXT { - NODE node; - - struct RNode *nd_chain; - struct RNode *nd_stts; -} rb_node_next_t; - -typedef struct RNode_REDO { - NODE node; - - struct RNode *nd_chain; -} rb_node_redo_t; typedef struct RNode_RETRY { NODE node; @@ -408,20 +377,12 @@ typedef struct RNode_ENSURE { struct RNode *nd_ensr; } rb_node_ensure_t; -/* RNode_AND and RNode_OR should be same structure */ -typedef struct RNode_AND { NODE node; struct RNode *nd_1st; struct RNode *nd_2nd; -} rb_node_and_t; - -typedef struct RNode_OR { - NODE node; - - struct RNode *nd_1st; - struct RNode *nd_2nd; -} rb_node_or_t; typedef struct RNode_MASGN { NODE node; @@ -656,14 +617,6 @@ typedef struct RNode_BACK_REF { long nd_nth; } rb_node_back_ref_t; -/* RNode_MATCH and RNode_REGX should be same structure */ -typedef struct RNode_MATCH { - NODE node; - - struct rb_parser_string *string; - int options; -} rb_node_match_t; - typedef struct RNode_MATCH2 { NODE node; @@ -719,14 +672,13 @@ typedef struct RNode_IMAGINARY { enum rb_numeric_type type; } rb_node_imaginary_t; -/* RNode_STR and RNode_XSTR should be same structure */ typedef struct RNode_STR { NODE node; struct rb_parser_string *string; } rb_node_str_t; -/* RNode_DSTR, RNode_DXSTR, RNode_DREGX and RNode_DSYM should be same structure */ typedef struct RNode_DSTR { NODE node; @@ -749,12 +701,12 @@ typedef struct RNode_EVSTR { struct RNode *nd_body; } rb_node_evstr_t; -typedef struct RNode_REGX { NODE node; struct rb_parser_string *string; int options; -} rb_node_regx_t; typedef rb_node_dstr_t rb_node_dregx_t; @@ -918,23 +870,13 @@ typedef struct RNode_COLON3 { ID nd_mid; } rb_node_colon3_t; -/* RNode_DOT2, RNode_DOT3, RNode_FLIP2 and RNode_FLIP3 should be same structure */ -typedef struct RNode_DOT2 { NODE node; struct RNode *nd_beg; struct RNode *nd_end; -} rb_node_dot2_t; - -typedef struct RNode_DOT3 { - NODE node; - - struct RNode *nd_beg; - struct RNode *nd_end; -} rb_node_dot3_t; - -typedef rb_node_dot2_t rb_node_flip2_t; -typedef rb_node_dot3_t rb_node_flip3_t; typedef struct RNode_SELF { NODE node; |