ruby-internal 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. data/Rakefile +1 -1
  2. data/bin/ruby-internal-node-dump +1 -1
  3. data/bin/ruby-internal-obfuscate +1 -1
  4. data/ext/cached/ruby-1.8.4/internal/node/node_type_descrip.c +45 -45
  5. data/ext/cached/ruby-1.8.4/internal/node/nodeinfo.c +259 -258
  6. data/ext/cached/ruby-1.8.5/internal/node/node_type_descrip.c +43 -43
  7. data/ext/cached/ruby-1.8.5/internal/node/nodeinfo.c +261 -260
  8. data/ext/cached/ruby-1.8.6/internal/node/node_type_descrip.c +45 -45
  9. data/ext/cached/ruby-1.8.6/internal/node/nodeinfo.c +261 -260
  10. data/ext/cached/ruby-1.8.7/internal/node/node_type_descrip.c +37 -37
  11. data/ext/cached/ruby-1.8.7/internal/node/nodeinfo.c +219 -218
  12. data/ext/cached/ruby-1.9.1/internal/node/global_entry.h +4 -0
  13. data/ext/cached/ruby-1.9.1/internal/node/node_type_descrip.c +41 -41
  14. data/ext/cached/ruby-1.9.1/internal/node/nodeinfo.c +231 -230
  15. data/ext/cached/ruby-1.9.2/internal/node/global_entry.h +4 -0
  16. data/ext/cached/ruby-1.9.2/internal/node/node_type_descrip.c +37 -37
  17. data/ext/cached/ruby-1.9.2/internal/node/nodeinfo.c +206 -205
  18. data/ext/cached/ruby-1.9.3/internal/node/global_entry.h +4 -0
  19. data/ext/cached/ruby-1.9.3/internal/node/node_type_descrip.c +41 -41
  20. data/ext/cached/ruby-1.9.3/internal/node/nodeinfo.c +230 -229
  21. data/ext/internal/binding/block.h +0 -20
  22. data/ext/internal/method/internal_method.h +5 -5
  23. data/ext/internal/module/classpath.c +13 -18
  24. data/ext/internal/module/classpath.h +3 -3
  25. data/ext/internal/module/getcfp.h +12 -0
  26. data/ext/internal/node/block.h +0 -20
  27. data/ext/internal/node/global_entry.h +31 -42
  28. data/ext/internal/node/global_entry.h.rpp +1 -1
  29. data/ext/internal/node/node_type_descrip.c +38 -47
  30. data/ext/internal/node/nodeinfo.c +311 -626
  31. data/ext/internal/node/nodeinfo.h +4 -1
  32. data/ext/internal/proc/block.h +0 -20
  33. data/ext/internal/tag/tag.h +0 -10
  34. data/ext/internal/vm/instruction/insns_info.c +5974 -3
  35. data/ext/internal/vm/instruction/insns_info.h +878 -0
  36. metadata +37 -51
@@ -2,15 +2,15 @@
2
2
  #include "version.h"
3
3
 
4
4
  Node_Type_Descrip node_type_descrips_unsorted[] = {
5
- { NODE_ALIAS, NEN_2ND, NEN_1ST, NEN_NONE, "ALIAS" },
5
+ { NODE_ALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "ALIAS" },
6
6
  #ifdef HAVE_NODE_ALLOCA
7
7
  { NODE_ALLOCA, NEN_CFNC, NEN_VALUE, NEN_CNT, "ALLOCA" },
8
8
  #endif
9
9
  { NODE_AND, NEN_2ND, NEN_1ST, NEN_NONE, "AND" },
10
- { NODE_ARGS, NEN_OPT, NEN_REST, NEN_CNT, "ARGS" },
10
+ { NODE_ARGS, NEN_REST, NEN_OPT, NEN_CNT, "ARGS" },
11
11
  { NODE_ARGSCAT, NEN_HEAD, NEN_BODY, NEN_NONE, "ARGSCAT" },
12
12
  { NODE_ARGSPUSH, NEN_HEAD, NEN_BODY, NEN_NONE, "ARGSPUSH" },
13
- { NODE_ARRAY, NEN_HEAD, NEN_ALEN, NEN_NEXT, "ARRAY" },
13
+ { NODE_ARRAY, NEN_ALEN, NEN_HEAD, NEN_NEXT, "ARRAY" },
14
14
  { NODE_ATTRASGN, NEN_RECV, NEN_ARGS, NEN_MID, "ATTRASGN" },
15
15
  { NODE_ATTRSET, NEN_VID, NEN_NONE, NEN_NONE, "ATTRSET" },
16
16
  { NODE_BACK_REF, NEN_NTH, NEN_CNT, NEN_NONE, "BACK_REF" },
@@ -20,78 +20,78 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
20
20
  { NODE_BLOCK_PASS, NEN_BODY, NEN_ITER, NEN_NONE, "BLOCK_PASS" },
21
21
  { NODE_BMETHOD, NEN_CVAL, NEN_NONE, NEN_NONE, "BMETHOD" },
22
22
  { NODE_BREAK, NEN_STTS, NEN_NONE, NEN_NONE, "BREAK" },
23
- { NODE_CALL, NEN_RECV, NEN_ARGS, NEN_MID, "CALL" },
23
+ { NODE_CALL, NEN_ARGS, NEN_MID, NEN_RECV, "CALL" },
24
24
  { NODE_CASE, NEN_HEAD, NEN_BODY, NEN_NEXT, "CASE" },
25
- { NODE_CDECL, NEN_VID, NEN_VALUE, NEN_NONE, "CDECL" },
25
+ { NODE_CDECL, NEN_VALUE, NEN_VID, NEN_NONE, "CDECL" },
26
26
  { NODE_CFUNC, NEN_CFNC, NEN_ARGC, NEN_NONE, "CFUNC" },
27
- { NODE_CLASS, NEN_BODY, NEN_CPATH, NEN_SUPER, "CLASS" },
27
+ { NODE_CLASS, NEN_SUPER, NEN_CPATH, NEN_BODY, "CLASS" },
28
28
  { NODE_COLON2, NEN_HEAD, NEN_MID, NEN_NONE, "COLON2" },
29
29
  { NODE_COLON3, NEN_MID, NEN_NONE, NEN_NONE, "COLON3" },
30
30
  { NODE_CONST, NEN_VID, NEN_NONE, NEN_NONE, "CONST" },
31
- { NODE_CREF, NEN_BODY, NEN_CLSS, NEN_NEXT, "CREF" },
31
+ { NODE_CREF, NEN_CLSS, NEN_BODY, NEN_NEXT, "CREF" },
32
32
  { NODE_CVAR, NEN_VID, NEN_NONE, NEN_NONE, "CVAR" },
33
- { NODE_CVASGN, NEN_VID, NEN_VALUE, NEN_NONE, "CVASGN" },
34
- { NODE_CVDECL, NEN_VID, NEN_VALUE, NEN_NONE, "CVDECL" },
35
- { NODE_DASGN, NEN_VID, NEN_VALUE, NEN_NONE, "DASGN" },
36
- { NODE_DASGN_CURR, NEN_VID, NEN_VALUE, NEN_NONE, "DASGN_CURR" },
33
+ { NODE_CVASGN, NEN_VALUE, NEN_VID, NEN_NONE, "CVASGN" },
34
+ { NODE_CVDECL, NEN_VALUE, NEN_VID, NEN_NONE, "CVDECL" },
35
+ { NODE_DASGN, NEN_VALUE, NEN_VID, NEN_NONE, "DASGN" },
36
+ { NODE_DASGN_CURR, NEN_VALUE, NEN_VID, NEN_NONE, "DASGN_CURR" },
37
37
  { NODE_DEFINED, NEN_HEAD, NEN_NONE, NEN_NONE, "DEFINED" },
38
- { NODE_DEFN, NEN_DEFN, NEN_NOEX, NEN_MID, "DEFN" },
38
+ { NODE_DEFN, NEN_DEFN, NEN_MID, NEN_NOEX, "DEFN" },
39
39
  { NODE_DEFS, NEN_DEFN, NEN_RECV, NEN_MID, "DEFS" },
40
40
  { NODE_DMETHOD, NEN_CVAL, NEN_NONE, NEN_NONE, "DMETHOD" },
41
- { NODE_DOT2, NEN_STATE, NEN_BEG, NEN_END, "DOT2" },
42
- { NODE_DOT3, NEN_STATE, NEN_BEG, NEN_END, "DOT3" },
43
- { NODE_DREGX, NEN_CFLAG, NEN_NEXT, NEN_LIT, "DREGX" },
44
- { NODE_DREGX_ONCE, NEN_CFLAG, NEN_NEXT, NEN_LIT, "DREGX_ONCE" },
45
- { NODE_DSTR, NEN_NEXT, NEN_LIT, NEN_NONE, "DSTR" },
46
- { NODE_DSYM, NEN_NEXT, NEN_LIT, NEN_NONE, "DSYM" },
41
+ { NODE_DOT2, NEN_BEG, NEN_END, NEN_STATE, "DOT2" },
42
+ { NODE_DOT3, NEN_BEG, NEN_END, NEN_STATE, "DOT3" },
43
+ { NODE_DREGX, NEN_LIT, NEN_NEXT, NEN_CFLAG, "DREGX" },
44
+ { NODE_DREGX_ONCE, NEN_LIT, NEN_NEXT, NEN_CFLAG, "DREGX_ONCE" },
45
+ { NODE_DSTR, NEN_LIT, NEN_NEXT, NEN_NONE, "DSTR" },
46
+ { NODE_DSYM, NEN_LIT, NEN_NEXT, NEN_NONE, "DSYM" },
47
47
  { NODE_DVAR, NEN_VID, NEN_NONE, NEN_NONE, "DVAR" },
48
- { NODE_DXSTR, NEN_NEXT, NEN_LIT, NEN_NONE, "DXSTR" },
48
+ { NODE_DXSTR, NEN_LIT, NEN_NEXT, NEN_NONE, "DXSTR" },
49
49
  { NODE_ENSURE, NEN_HEAD, NEN_ENSR, NEN_NONE, "ENSURE" },
50
50
  { NODE_EVSTR, NEN_BODY, NEN_NONE, NEN_NONE, "EVSTR" },
51
51
  { NODE_FALSE, NEN_NONE, NEN_NONE, NEN_NONE, "FALSE" },
52
- { NODE_FBODY, NEN_HEAD, NEN_ORIG, NEN_MID, "FBODY" },
52
+ { NODE_FBODY, NEN_ORIG, NEN_MID, NEN_HEAD, "FBODY" },
53
53
  { NODE_FCALL, NEN_ARGS, NEN_MID, NEN_NONE, "FCALL" },
54
- { NODE_FLIP2, NEN_BEG, NEN_CNT, NEN_END, "FLIP2" },
55
- { NODE_FLIP3, NEN_BEG, NEN_CNT, NEN_END, "FLIP3" },
54
+ { NODE_FLIP2, NEN_CNT, NEN_BEG, NEN_END, "FLIP2" },
55
+ { NODE_FLIP3, NEN_CNT, NEN_BEG, NEN_END, "FLIP3" },
56
56
  { NODE_FOR, NEN_BODY, NEN_ITER, NEN_VAR, "FOR" },
57
- { NODE_GASGN, NEN_VID, NEN_VALUE, NEN_ENTRY, "GASGN" },
57
+ { NODE_GASGN, NEN_VALUE, NEN_VID, NEN_ENTRY, "GASGN" },
58
58
  { NODE_GVAR, NEN_VID, NEN_ENTRY, NEN_NONE, "GVAR" },
59
59
  { NODE_HASH, NEN_HEAD, NEN_NONE, NEN_NONE, "HASH" },
60
- { NODE_IASGN, NEN_VID, NEN_VALUE, NEN_NONE, "IASGN" },
61
- { NODE_IF, NEN_ELSE, NEN_BODY, NEN_COND, "IF" },
62
- { NODE_IFUNC, NEN_CFNC, NEN_STATE, NEN_TVAL, "IFUNC" },
60
+ { NODE_IASGN, NEN_VALUE, NEN_VID, NEN_NONE, "IASGN" },
61
+ { NODE_IF, NEN_COND, NEN_BODY, NEN_ELSE, "IF" },
62
+ { NODE_IFUNC, NEN_CFNC, NEN_TVAL, NEN_STATE, "IFUNC" },
63
63
  { NODE_ITER, NEN_BODY, NEN_ITER, NEN_VAR, "ITER" },
64
64
  { NODE_IVAR, NEN_VID, NEN_NONE, NEN_NONE, "IVAR" },
65
- { NODE_LASGN, NEN_VID, NEN_VALUE, NEN_CNT, "LASGN" },
65
+ { NODE_LASGN, NEN_VALUE, NEN_VID, NEN_CNT, "LASGN" },
66
66
  { NODE_LIT, NEN_LIT, NEN_NONE, NEN_NONE, "LIT" },
67
67
  { NODE_LVAR, NEN_VID, NEN_CNT, NEN_NONE, "LVAR" },
68
- { NODE_MASGN, NEN_HEAD, NEN_VALUE, NEN_ARGS, "MASGN" },
69
- { NODE_MATCH, NEN_VALUE, NEN_LIT, NEN_NONE, "MATCH" },
68
+ { NODE_MASGN, NEN_ARGS, NEN_HEAD, NEN_VALUE, "MASGN" },
69
+ { NODE_MATCH, NEN_LIT, NEN_VALUE, NEN_NONE, "MATCH" },
70
70
  { NODE_MATCH2, NEN_RECV, NEN_VALUE, NEN_NONE, "MATCH2" },
71
71
  { NODE_MATCH3, NEN_RECV, NEN_VALUE, NEN_NONE, "MATCH3" },
72
72
  { NODE_MEMO, NEN_NONE, NEN_NONE, NEN_NONE, "MEMO" },
73
- { NODE_METHOD, NEN_BODY, NEN_NOEX, NEN_NONE, "METHOD" },
74
- { NODE_MODULE, NEN_BODY, NEN_CPATH, NEN_NONE, "MODULE" },
73
+ { NODE_METHOD, NEN_NOEX, NEN_BODY, NEN_NONE, "METHOD" },
74
+ { NODE_MODULE, NEN_CPATH, NEN_BODY, NEN_NONE, "MODULE" },
75
75
  { NODE_NEWLINE, NEN_NEXT, NEN_NONE, NEN_NONE, "NEWLINE" },
76
76
  { NODE_NEXT, NEN_STTS, NEN_NONE, NEN_NONE, "NEXT" },
77
77
  { NODE_NIL, NEN_NONE, NEN_NONE, NEN_NONE, "NIL" },
78
78
  { NODE_NOT, NEN_BODY, NEN_NONE, NEN_NONE, "NOT" },
79
79
  { NODE_NTH_REF, NEN_NTH, NEN_CNT, NEN_NONE, "NTH_REF" },
80
80
  { NODE_OPT_N, NEN_BODY, NEN_NONE, NEN_NONE, "OPT_N" },
81
- { NODE_OP_ASGN1, NEN_RECV, NEN_ARGS, NEN_MID, "OP_ASGN1" },
82
- { NODE_OP_ASGN2, NEN_RECV, NEN_VALUE, NEN_NEXT, "OP_ASGN2" },
81
+ { NODE_OP_ASGN1, NEN_ARGS, NEN_MID, NEN_RECV, "OP_ASGN1" },
82
+ { NODE_OP_ASGN2, NEN_RECV, NEN_NEXT, NEN_VALUE, "OP_ASGN2" },
83
83
  { NODE_OP_ASGN2_ARG, NEN_VID, NEN_AID, NEN_MID, "OP_ASGN2_ARG" },
84
84
  { NODE_OP_ASGN_AND, NEN_RECV, NEN_VALUE, NEN_NONE, "OP_ASGN_AND" },
85
- { NODE_OP_ASGN_OR, NEN_RECV, NEN_VALUE, NEN_AID, "OP_ASGN_OR" },
85
+ { NODE_OP_ASGN_OR, NEN_AID, NEN_VALUE, NEN_RECV, "OP_ASGN_OR" },
86
86
  { NODE_OR, NEN_2ND, NEN_1ST, NEN_NONE, "OR" },
87
87
  { NODE_POSTEXE, NEN_NONE, NEN_NONE, NEN_NONE, "POSTEXE" },
88
88
  { NODE_REDO, NEN_NONE, NEN_NONE, NEN_NONE, "REDO" },
89
89
  { NODE_RESBODY, NEN_HEAD, NEN_BODY, NEN_ARGS, "RESBODY" },
90
- { NODE_RESCUE, NEN_ELSE, NEN_HEAD, NEN_RESQ, "RESCUE" },
90
+ { NODE_RESCUE, NEN_HEAD, NEN_RESQ, NEN_ELSE, "RESCUE" },
91
91
  { NODE_RETRY, NEN_NONE, NEN_NONE, NEN_NONE, "RETRY" },
92
92
  { NODE_RETURN, NEN_STTS, NEN_NONE, NEN_NONE, "RETURN" },
93
93
  { NODE_SCLASS, NEN_BODY, NEN_RECV, NEN_NONE, "SCLASS" },
94
- { NODE_SCOPE, NEN_RVAL, NEN_TBL, NEN_NEXT, "SCOPE" },
94
+ { NODE_SCOPE, NEN_TBL, NEN_RVAL, NEN_NEXT, "SCOPE" },
95
95
  { NODE_SELF, NEN_NONE, NEN_NONE, NEN_NONE, "SELF" },
96
96
  { NODE_SPLAT, NEN_HEAD, NEN_NONE, NEN_NONE, "SPLAT" },
97
97
  { NODE_STR, NEN_LIT, NEN_NONE, NEN_NONE, "STR" },
@@ -101,7 +101,7 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
101
101
  { NODE_TRUE, NEN_NONE, NEN_NONE, NEN_NONE, "TRUE" },
102
102
  { NODE_UNDEF, NEN_BODY, NEN_NONE, NEN_NONE, "UNDEF" },
103
103
  { NODE_UNTIL, NEN_BODY, NEN_COND, NEN_STATE, "UNTIL" },
104
- { NODE_VALIAS, NEN_2ND, NEN_1ST, NEN_NONE, "VALIAS" },
104
+ { NODE_VALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "VALIAS" },
105
105
  { NODE_VCALL, NEN_MID, NEN_NONE, NEN_NONE, "VCALL" },
106
106
  { NODE_WHEN, NEN_HEAD, NEN_BODY, NEN_NEXT, "WHEN" },
107
107
  { NODE_WHILE, NEN_BODY, NEN_COND, NEN_STATE, "WHILE" },
@@ -2925,10 +2925,10 @@ void define_node_subclass_methods()
2925
2925
  rb_iv_set(rb_cALIAS, "__member__", members);
2926
2926
  rb_iv_set(rb_cALIAS, "__type__", INT2NUM(NODE_ALIAS));
2927
2927
  rb_define_singleton_method(rb_cALIAS, "members", node_s_members, 0);
2928
- rb_define_method(rb_cALIAS, "second", node_2nd, 0);
2929
- rb_ary_push(members, rb_str_new2("second"));
2930
2928
  rb_define_method(rb_cALIAS, "first", node_1st, 0);
2931
2929
  rb_ary_push(members, rb_str_new2("first"));
2930
+ rb_define_method(rb_cALIAS, "second", node_2nd, 0);
2931
+ rb_ary_push(members, rb_str_new2("second"));
2932
2932
  }
2933
2933
 
2934
2934
  /* Document-class: Node::ALLOCA
@@ -3005,6 +3005,12 @@ void define_node_subclass_methods()
3005
3005
  rb_iv_set(rb_cARGS, "__type__", INT2NUM(NODE_ARGS));
3006
3006
  rb_define_singleton_method(rb_cARGS, "members", node_s_members, 0);
3007
3007
 
3008
+ /* Document-method: rest
3009
+ * an assignment node to assign the rest arg, if it is present
3010
+ */
3011
+ rb_define_method(rb_cARGS, "rest", node_rest, 0);
3012
+ rb_ary_push(members, rb_str_new2("rest"));
3013
+
3008
3014
  /* Document-method: opt
3009
3015
  * a list of assignment nodes to assign default values to the
3010
3016
  * optional arguments if no argument is specified
@@ -3012,12 +3018,6 @@ void define_node_subclass_methods()
3012
3018
  rb_define_method(rb_cARGS, "opt", node_opt, 0);
3013
3019
  rb_ary_push(members, rb_str_new2("opt"));
3014
3020
 
3015
- /* Document-method: rest
3016
- * an assignment node to assign the rest arg, if it is present
3017
- */
3018
- rb_define_method(rb_cARGS, "rest", node_rest, 0);
3019
- rb_ary_push(members, rb_str_new2("rest"));
3020
-
3021
3021
  /* Document-method: cnt
3022
3022
  * the number of required arguments
3023
3023
  */
@@ -3088,14 +3088,14 @@ void define_node_subclass_methods()
3088
3088
  rb_iv_set(rb_cARRAY, "__member__", members);
3089
3089
  rb_iv_set(rb_cARRAY, "__type__", INT2NUM(NODE_ARRAY));
3090
3090
  rb_define_singleton_method(rb_cARRAY, "members", node_s_members, 0);
3091
+ rb_define_method(rb_cARRAY, "alen", node_alen, 0);
3092
+ rb_ary_push(members, rb_str_new2("alen"));
3091
3093
 
3092
3094
  /* Document-method: head
3093
3095
  * the first element of the array
3094
3096
  */
3095
3097
  rb_define_method(rb_cARRAY, "head", node_head, 0);
3096
3098
  rb_ary_push(members, rb_str_new2("head"));
3097
- rb_define_method(rb_cARRAY, "alen", node_alen, 0);
3098
- rb_ary_push(members, rb_str_new2("alen"));
3099
3099
 
3100
3100
  /* Document-method: next
3101
3101
  * the tail of the array
@@ -3340,12 +3340,6 @@ void define_node_subclass_methods()
3340
3340
  rb_iv_set(rb_cCALL, "__type__", INT2NUM(NODE_CALL));
3341
3341
  rb_define_singleton_method(rb_cCALL, "members", node_s_members, 0);
3342
3342
 
3343
- /* Document-method: recv
3344
- * the receiver of the method
3345
- */
3346
- rb_define_method(rb_cCALL, "recv", node_recv, 0);
3347
- rb_ary_push(members, rb_str_new2("recv"));
3348
-
3349
3343
  /* Document-method: args
3350
3344
  * the arguments to the method
3351
3345
  */
@@ -3357,6 +3351,12 @@ void define_node_subclass_methods()
3357
3351
  */
3358
3352
  rb_define_method(rb_cCALL, "mid", node_mid, 0);
3359
3353
  rb_ary_push(members, rb_str_new2("mid"));
3354
+
3355
+ /* Document-method: recv
3356
+ * the receiver of the method
3357
+ */
3358
+ rb_define_method(rb_cCALL, "recv", node_recv, 0);
3359
+ rb_ary_push(members, rb_str_new2("recv"));
3360
3360
  }
3361
3361
 
3362
3362
  /* Document-class: Node::CASE
@@ -3402,17 +3402,17 @@ void define_node_subclass_methods()
3402
3402
  rb_iv_set(rb_cCDECL, "__type__", INT2NUM(NODE_CDECL));
3403
3403
  rb_define_singleton_method(rb_cCDECL, "members", node_s_members, 0);
3404
3404
 
3405
- /* Document-method: vid
3406
- * the name of the constant to be assigned, all uppercase
3407
- */
3408
- rb_define_method(rb_cCDECL, "vid", node_vid, 0);
3409
- rb_ary_push(members, rb_str_new2("vid"));
3410
-
3411
3405
  /* Document-method: value
3412
3406
  * the value to be assigned to the constant
3413
3407
  */
3414
3408
  rb_define_method(rb_cCDECL, "value", node_value, 0);
3415
3409
  rb_ary_push(members, rb_str_new2("value"));
3410
+
3411
+ /* Document-method: vid
3412
+ * the name of the constant to be assigned, all uppercase
3413
+ */
3414
+ rb_define_method(rb_cCDECL, "vid", node_vid, 0);
3415
+ rb_ary_push(members, rb_str_new2("vid"));
3416
3416
  }
3417
3417
 
3418
3418
  /* Document-class: Node::CFUNC
@@ -3455,11 +3455,12 @@ void define_node_subclass_methods()
3455
3455
  rb_iv_set(rb_cCLASS, "__type__", INT2NUM(NODE_CLASS));
3456
3456
  rb_define_singleton_method(rb_cCLASS, "members", node_s_members, 0);
3457
3457
 
3458
- /* Document-method: body
3459
- * the body of the class definition
3458
+ /* Document-method: super
3459
+ * an expression returning the base class, or false if there is no
3460
+ * base class specified
3460
3461
  */
3461
- rb_define_method(rb_cCLASS, "body", node_body, 0);
3462
- rb_ary_push(members, rb_str_new2("body"));
3462
+ rb_define_method(rb_cCLASS, "super", node_super, 0);
3463
+ rb_ary_push(members, rb_str_new2("super"));
3463
3464
 
3464
3465
  /* Document-method: cpath
3465
3466
  * the name of the class to define
@@ -3467,12 +3468,11 @@ void define_node_subclass_methods()
3467
3468
  rb_define_method(rb_cCLASS, "cpath", node_cpath, 0);
3468
3469
  rb_ary_push(members, rb_str_new2("cpath"));
3469
3470
 
3470
- /* Document-method: super
3471
- * an expression returning the base class, or false if there is no
3472
- * base class specified
3471
+ /* Document-method: body
3472
+ * the body of the class definition
3473
3473
  */
3474
- rb_define_method(rb_cCLASS, "super", node_super, 0);
3475
- rb_ary_push(members, rb_str_new2("super"));
3474
+ rb_define_method(rb_cCLASS, "body", node_body, 0);
3475
+ rb_ary_push(members, rb_str_new2("body"));
3476
3476
  }
3477
3477
 
3478
3478
  /* Document-class: Node::COLON2
@@ -3560,18 +3560,18 @@ void define_node_subclass_methods()
3560
3560
  rb_iv_set(rb_cCREF, "__type__", INT2NUM(NODE_CREF));
3561
3561
  rb_define_singleton_method(rb_cCREF, "members", node_s_members, 0);
3562
3562
 
3563
- /* Document-method: body
3564
- * always 0 (false)
3565
- */
3566
- rb_define_method(rb_cCREF, "body", node_body, 0);
3567
- rb_ary_push(members, rb_str_new2("body"));
3568
-
3569
3563
  /* Document-method: clss
3570
3564
  * the new class to use for the cbase.
3571
3565
  */
3572
3566
  rb_define_method(rb_cCREF, "clss", node_clss, 0);
3573
3567
  rb_ary_push(members, rb_str_new2("clss"));
3574
3568
 
3569
+ /* Document-method: body
3570
+ * always 0 (false)
3571
+ */
3572
+ rb_define_method(rb_cCREF, "body", node_body, 0);
3573
+ rb_ary_push(members, rb_str_new2("body"));
3574
+
3575
3575
  /* Document-method: next
3576
3576
  * the previous value of ruby_cref or ruby_top_cref
3577
3577
  */
@@ -3609,18 +3609,18 @@ void define_node_subclass_methods()
3609
3609
  rb_iv_set(rb_cCVASGN, "__type__", INT2NUM(NODE_CVASGN));
3610
3610
  rb_define_singleton_method(rb_cCVASGN, "members", node_s_members, 0);
3611
3611
 
3612
- /* Document-method: vid
3613
- * the name of the class variable to assign
3614
- */
3615
- rb_define_method(rb_cCVASGN, "vid", node_vid, 0);
3616
- rb_ary_push(members, rb_str_new2("vid"));
3617
-
3618
3612
  /* Document-method: value
3619
3613
  * an expression whose result is the new value of the class
3620
3614
  * variable
3621
3615
  */
3622
3616
  rb_define_method(rb_cCVASGN, "value", node_value, 0);
3623
3617
  rb_ary_push(members, rb_str_new2("value"));
3618
+
3619
+ /* Document-method: vid
3620
+ * the name of the class variable to assign
3621
+ */
3622
+ rb_define_method(rb_cCVASGN, "vid", node_vid, 0);
3623
+ rb_ary_push(members, rb_str_new2("vid"));
3624
3624
  }
3625
3625
 
3626
3626
  /* Document-class: Node::CVDECL
@@ -3636,18 +3636,18 @@ void define_node_subclass_methods()
3636
3636
  rb_iv_set(rb_cCVDECL, "__type__", INT2NUM(NODE_CVDECL));
3637
3637
  rb_define_singleton_method(rb_cCVDECL, "members", node_s_members, 0);
3638
3638
 
3639
- /* Document-method: vid
3640
- * the name of the class variable to assign
3641
- */
3642
- rb_define_method(rb_cCVDECL, "vid", node_vid, 0);
3643
- rb_ary_push(members, rb_str_new2("vid"));
3644
-
3645
3639
  /* Document-method: value
3646
3640
  * an expression whose result is the new value of the class
3647
3641
  * variable
3648
3642
  */
3649
3643
  rb_define_method(rb_cCVDECL, "value", node_value, 0);
3650
3644
  rb_ary_push(members, rb_str_new2("value"));
3645
+
3646
+ /* Document-method: vid
3647
+ * the name of the class variable to assign
3648
+ */
3649
+ rb_define_method(rb_cCVDECL, "vid", node_vid, 0);
3650
+ rb_ary_push(members, rb_str_new2("vid"));
3651
3651
  }
3652
3652
 
3653
3653
  /* Document-class: Node::DASGN
@@ -3670,17 +3670,17 @@ void define_node_subclass_methods()
3670
3670
  rb_iv_set(rb_cDASGN, "__type__", INT2NUM(NODE_DASGN));
3671
3671
  rb_define_singleton_method(rb_cDASGN, "members", node_s_members, 0);
3672
3672
 
3673
- /* Document-method: vid
3674
- * the name of the local variable
3675
- */
3676
- rb_define_method(rb_cDASGN, "vid", node_vid, 0);
3677
- rb_ary_push(members, rb_str_new2("vid"));
3678
-
3679
3673
  /* Document-method: value
3680
3674
  * the value to assign to the local variable
3681
3675
  */
3682
3676
  rb_define_method(rb_cDASGN, "value", node_value, 0);
3683
3677
  rb_ary_push(members, rb_str_new2("value"));
3678
+
3679
+ /* Document-method: vid
3680
+ * the name of the local variable
3681
+ */
3682
+ rb_define_method(rb_cDASGN, "vid", node_vid, 0);
3683
+ rb_ary_push(members, rb_str_new2("vid"));
3684
3684
  }
3685
3685
 
3686
3686
  /* Document-class: Node::DASGN_CURR
@@ -3695,17 +3695,17 @@ void define_node_subclass_methods()
3695
3695
  rb_iv_set(rb_cDASGN_CURR, "__type__", INT2NUM(NODE_DASGN_CURR));
3696
3696
  rb_define_singleton_method(rb_cDASGN_CURR, "members", node_s_members, 0);
3697
3697
 
3698
- /* Document-method: vid
3699
- * the name of the local variable
3700
- */
3701
- rb_define_method(rb_cDASGN_CURR, "vid", node_vid, 0);
3702
- rb_ary_push(members, rb_str_new2("vid"));
3703
-
3704
3698
  /* Document-method: value
3705
3699
  * the value to assign to the local variable
3706
3700
  */
3707
3701
  rb_define_method(rb_cDASGN_CURR, "value", node_value, 0);
3708
3702
  rb_ary_push(members, rb_str_new2("value"));
3703
+
3704
+ /* Document-method: vid
3705
+ * the name of the local variable
3706
+ */
3707
+ rb_define_method(rb_cDASGN_CURR, "vid", node_vid, 0);
3708
+ rb_ary_push(members, rb_str_new2("vid"));
3709
3709
  }
3710
3710
 
3711
3711
  /* Document-class: Node::DEFINED
@@ -3747,17 +3747,17 @@ void define_node_subclass_methods()
3747
3747
  rb_define_method(rb_cDEFN, "defn", node_defn, 0);
3748
3748
  rb_ary_push(members, rb_str_new2("defn"));
3749
3749
 
3750
- /* Document-method: noex
3751
- * the flags which should be used to define the method
3752
- */
3753
- rb_define_method(rb_cDEFN, "noex", node_noex, 0);
3754
- rb_ary_push(members, rb_str_new2("noex"));
3755
-
3756
3750
  /* Document-method: mid
3757
3751
  * the name of the method* defn the body of the method
3758
3752
  */
3759
3753
  rb_define_method(rb_cDEFN, "mid", node_mid, 0);
3760
3754
  rb_ary_push(members, rb_str_new2("mid"));
3755
+
3756
+ /* Document-method: noex
3757
+ * the flags which should be used to define the method
3758
+ */
3759
+ rb_define_method(rb_cDEFN, "noex", node_noex, 0);
3760
+ rb_ary_push(members, rb_str_new2("noex"));
3761
3761
  }
3762
3762
 
3763
3763
  /* Document-class: Node::DEFS
@@ -3824,8 +3824,6 @@ void define_node_subclass_methods()
3824
3824
  rb_iv_set(rb_cDOT2, "__member__", members);
3825
3825
  rb_iv_set(rb_cDOT2, "__type__", INT2NUM(NODE_DOT2));
3826
3826
  rb_define_singleton_method(rb_cDOT2, "members", node_s_members, 0);
3827
- rb_define_method(rb_cDOT2, "state", node_state, 0);
3828
- rb_ary_push(members, rb_str_new2("state"));
3829
3827
 
3830
3828
  /* Document-method: beg
3831
3829
  * the beginning of the range
@@ -3838,6 +3836,8 @@ void define_node_subclass_methods()
3838
3836
  */
3839
3837
  rb_define_method(rb_cDOT2, "end", node_end, 0);
3840
3838
  rb_ary_push(members, rb_str_new2("end"));
3839
+ rb_define_method(rb_cDOT2, "state", node_state, 0);
3840
+ rb_ary_push(members, rb_str_new2("state"));
3841
3841
  }
3842
3842
 
3843
3843
  /* Document-class: Node::DOT3
@@ -3852,8 +3852,6 @@ void define_node_subclass_methods()
3852
3852
  rb_iv_set(rb_cDOT3, "__member__", members);
3853
3853
  rb_iv_set(rb_cDOT3, "__type__", INT2NUM(NODE_DOT3));
3854
3854
  rb_define_singleton_method(rb_cDOT3, "members", node_s_members, 0);
3855
- rb_define_method(rb_cDOT3, "state", node_state, 0);
3856
- rb_ary_push(members, rb_str_new2("state"));
3857
3855
 
3858
3856
  /* Document-method: beg
3859
3857
  * the beginning of the range
@@ -3866,6 +3864,8 @@ void define_node_subclass_methods()
3866
3864
  */
3867
3865
  rb_define_method(rb_cDOT3, "end", node_end, 0);
3868
3866
  rb_ary_push(members, rb_str_new2("end"));
3867
+ rb_define_method(rb_cDOT3, "state", node_state, 0);
3868
+ rb_ary_push(members, rb_str_new2("state"));
3869
3869
  }
3870
3870
 
3871
3871
  /* Document-class: Node::DREGX
@@ -3884,6 +3884,18 @@ void define_node_subclass_methods()
3884
3884
  rb_iv_set(rb_cDREGX, "__type__", INT2NUM(NODE_DREGX));
3885
3885
  rb_define_singleton_method(rb_cDREGX, "members", node_s_members, 0);
3886
3886
 
3887
+ /* Document-method: lit
3888
+ * a string
3889
+ */
3890
+ rb_define_method(rb_cDREGX, "lit", node_lit, 0);
3891
+ rb_ary_push(members, rb_str_new2("lit"));
3892
+
3893
+ /* Document-method: next
3894
+ * a list of expressions to be appended onto the string
3895
+ */
3896
+ rb_define_method(rb_cDREGX, "next", node_next, 0);
3897
+ rb_ary_push(members, rb_str_new2("next"));
3898
+
3887
3899
  /* Document-method: cflag
3888
3900
  * a bitfield containing the options used in the regular
3889
3901
  * expression. Valid values include:
@@ -3900,18 +3912,6 @@ void define_node_subclass_methods()
3900
3912
  */
3901
3913
  rb_define_method(rb_cDREGX, "cflag", node_cflag, 0);
3902
3914
  rb_ary_push(members, rb_str_new2("cflag"));
3903
-
3904
- /* Document-method: next
3905
- * a list of expressions to be appended onto the string
3906
- */
3907
- rb_define_method(rb_cDREGX, "next", node_next, 0);
3908
- rb_ary_push(members, rb_str_new2("next"));
3909
-
3910
- /* Document-method: lit
3911
- * a string
3912
- */
3913
- rb_define_method(rb_cDREGX, "lit", node_lit, 0);
3914
- rb_ary_push(members, rb_str_new2("lit"));
3915
3915
  }
3916
3916
 
3917
3917
  /* Document-class: Node::DREGX_ONCE
@@ -3927,12 +3927,11 @@ void define_node_subclass_methods()
3927
3927
  rb_iv_set(rb_cDREGX_ONCE, "__type__", INT2NUM(NODE_DREGX_ONCE));
3928
3928
  rb_define_singleton_method(rb_cDREGX_ONCE, "members", node_s_members, 0);
3929
3929
 
3930
- /* Document-method: cflag
3931
- * a bitfield containing the options used in the regular
3932
- * expression. See DREGX for a list of valid values.
3930
+ /* Document-method: lit
3931
+ * a string
3933
3932
  */
3934
- rb_define_method(rb_cDREGX_ONCE, "cflag", node_cflag, 0);
3935
- rb_ary_push(members, rb_str_new2("cflag"));
3933
+ rb_define_method(rb_cDREGX_ONCE, "lit", node_lit, 0);
3934
+ rb_ary_push(members, rb_str_new2("lit"));
3936
3935
 
3937
3936
  /* Document-method: next
3938
3937
  * a list of expressions to be appended onto the string
@@ -3940,11 +3939,12 @@ void define_node_subclass_methods()
3940
3939
  rb_define_method(rb_cDREGX_ONCE, "next", node_next, 0);
3941
3940
  rb_ary_push(members, rb_str_new2("next"));
3942
3941
 
3943
- /* Document-method: lit
3944
- * a string
3942
+ /* Document-method: cflag
3943
+ * a bitfield containing the options used in the regular
3944
+ * expression. See DREGX for a list of valid values.
3945
3945
  */
3946
- rb_define_method(rb_cDREGX_ONCE, "lit", node_lit, 0);
3947
- rb_ary_push(members, rb_str_new2("lit"));
3946
+ rb_define_method(rb_cDREGX_ONCE, "cflag", node_cflag, 0);
3947
+ rb_ary_push(members, rb_str_new2("cflag"));
3948
3948
  }
3949
3949
 
3950
3950
  /* Document-class: Node::DSTR
@@ -3963,17 +3963,17 @@ void define_node_subclass_methods()
3963
3963
  rb_iv_set(rb_cDSTR, "__type__", INT2NUM(NODE_DSTR));
3964
3964
  rb_define_singleton_method(rb_cDSTR, "members", node_s_members, 0);
3965
3965
 
3966
- /* Document-method: next
3967
- * a list of expressions to be appended onto the string
3968
- */
3969
- rb_define_method(rb_cDSTR, "next", node_next, 0);
3970
- rb_ary_push(members, rb_str_new2("next"));
3971
-
3972
3966
  /* Document-method: lit
3973
3967
  * a string
3974
3968
  */
3975
3969
  rb_define_method(rb_cDSTR, "lit", node_lit, 0);
3976
3970
  rb_ary_push(members, rb_str_new2("lit"));
3971
+
3972
+ /* Document-method: next
3973
+ * a list of expressions to be appended onto the string
3974
+ */
3975
+ rb_define_method(rb_cDSTR, "next", node_next, 0);
3976
+ rb_ary_push(members, rb_str_new2("next"));
3977
3977
  }
3978
3978
 
3979
3979
  /* Document-class: Node::DSYM
@@ -3994,10 +3994,10 @@ void define_node_subclass_methods()
3994
3994
  rb_iv_set(rb_cDSYM, "__member__", members);
3995
3995
  rb_iv_set(rb_cDSYM, "__type__", INT2NUM(NODE_DSYM));
3996
3996
  rb_define_singleton_method(rb_cDSYM, "members", node_s_members, 0);
3997
- rb_define_method(rb_cDSYM, "next", node_next, 0);
3998
- rb_ary_push(members, rb_str_new2("next"));
3999
3997
  rb_define_method(rb_cDSYM, "lit", node_lit, 0);
4000
3998
  rb_ary_push(members, rb_str_new2("lit"));
3999
+ rb_define_method(rb_cDSYM, "next", node_next, 0);
4000
+ rb_ary_push(members, rb_str_new2("next"));
4001
4001
  }
4002
4002
 
4003
4003
  /* Document-class: Node::DVAR
@@ -4040,17 +4040,17 @@ void define_node_subclass_methods()
4040
4040
  rb_iv_set(rb_cDXSTR, "__type__", INT2NUM(NODE_DXSTR));
4041
4041
  rb_define_singleton_method(rb_cDXSTR, "members", node_s_members, 0);
4042
4042
 
4043
- /* Document-method: next
4044
- * a list of expressions to be appended onto the string
4045
- */
4046
- rb_define_method(rb_cDXSTR, "next", node_next, 0);
4047
- rb_ary_push(members, rb_str_new2("next"));
4048
-
4049
4043
  /* Document-method: lit
4050
4044
  * a string
4051
4045
  */
4052
4046
  rb_define_method(rb_cDXSTR, "lit", node_lit, 0);
4053
4047
  rb_ary_push(members, rb_str_new2("lit"));
4048
+
4049
+ /* Document-method: next
4050
+ * a list of expressions to be appended onto the string
4051
+ */
4052
+ rb_define_method(rb_cDXSTR, "next", node_next, 0);
4053
+ rb_ary_push(members, rb_str_new2("next"));
4054
4054
  }
4055
4055
 
4056
4056
  /* Document-class: Node::ENSURE
@@ -4134,12 +4134,6 @@ void define_node_subclass_methods()
4134
4134
  rb_iv_set(rb_cFBODY, "__type__", INT2NUM(NODE_FBODY));
4135
4135
  rb_define_singleton_method(rb_cFBODY, "members", node_s_members, 0);
4136
4136
 
4137
- /* Document-method: head
4138
- * the method body
4139
- */
4140
- rb_define_method(rb_cFBODY, "head", node_head, 0);
4141
- rb_ary_push(members, rb_str_new2("head"));
4142
-
4143
4137
  /* Document-method: orig
4144
4138
  * the origin class
4145
4139
  */
@@ -4151,6 +4145,12 @@ void define_node_subclass_methods()
4151
4145
  */
4152
4146
  rb_define_method(rb_cFBODY, "mid", node_mid, 0);
4153
4147
  rb_ary_push(members, rb_str_new2("mid"));
4148
+
4149
+ /* Document-method: head
4150
+ * the method body
4151
+ */
4152
+ rb_define_method(rb_cFBODY, "head", node_head, 0);
4153
+ rb_ary_push(members, rb_str_new2("head"));
4154
4154
  }
4155
4155
 
4156
4156
  /* Document-class: Node::FCALL
@@ -4195,12 +4195,6 @@ void define_node_subclass_methods()
4195
4195
  rb_iv_set(rb_cFLIP2, "__type__", INT2NUM(NODE_FLIP2));
4196
4196
  rb_define_singleton_method(rb_cFLIP2, "members", node_s_members, 0);
4197
4197
 
4198
- /* Document-method: beg
4199
- * the beginning of the range
4200
- */
4201
- rb_define_method(rb_cFLIP2, "beg", node_beg, 0);
4202
- rb_ary_push(members, rb_str_new2("beg"));
4203
-
4204
4198
  /* Document-method: cnt
4205
4199
  * the index into the local variable table of the special variable
4206
4200
  * to use in the flip-flop expression (usually 2 for $_)
@@ -4208,6 +4202,12 @@ void define_node_subclass_methods()
4208
4202
  rb_define_method(rb_cFLIP2, "cnt", node_cnt, 0);
4209
4203
  rb_ary_push(members, rb_str_new2("cnt"));
4210
4204
 
4205
+ /* Document-method: beg
4206
+ * the beginning of the range
4207
+ */
4208
+ rb_define_method(rb_cFLIP2, "beg", node_beg, 0);
4209
+ rb_ary_push(members, rb_str_new2("beg"));
4210
+
4211
4211
  /* Document-method: end
4212
4212
  * the end of the range
4213
4213
  */
@@ -4229,12 +4229,6 @@ void define_node_subclass_methods()
4229
4229
  rb_iv_set(rb_cFLIP3, "__type__", INT2NUM(NODE_FLIP3));
4230
4230
  rb_define_singleton_method(rb_cFLIP3, "members", node_s_members, 0);
4231
4231
 
4232
- /* Document-method: beg
4233
- * the beginning of the range
4234
- */
4235
- rb_define_method(rb_cFLIP3, "beg", node_beg, 0);
4236
- rb_ary_push(members, rb_str_new2("beg"));
4237
-
4238
4232
  /* Document-method: cnt
4239
4233
  * the index into the local variable table of the special variable
4240
4234
  * to use in the flip-flop expression (usually 2 for $_)
@@ -4242,6 +4236,12 @@ void define_node_subclass_methods()
4242
4236
  rb_define_method(rb_cFLIP3, "cnt", node_cnt, 0);
4243
4237
  rb_ary_push(members, rb_str_new2("cnt"));
4244
4238
 
4239
+ /* Document-method: beg
4240
+ * the beginning of the range
4241
+ */
4242
+ rb_define_method(rb_cFLIP3, "beg", node_beg, 0);
4243
+ rb_ary_push(members, rb_str_new2("beg"));
4244
+
4245
4245
  /* Document-method: end
4246
4246
  * the end of the range
4247
4247
  */
@@ -4303,17 +4303,17 @@ void define_node_subclass_methods()
4303
4303
  rb_iv_set(rb_cGASGN, "__type__", INT2NUM(NODE_GASGN));
4304
4304
  rb_define_singleton_method(rb_cGASGN, "members", node_s_members, 0);
4305
4305
 
4306
- /* Document-method: vid
4307
- * the name of the global variable, with a leading '$' character.
4308
- */
4309
- rb_define_method(rb_cGASGN, "vid", node_vid, 0);
4310
- rb_ary_push(members, rb_str_new2("vid"));
4311
-
4312
4306
  /* Document-method: value
4313
4307
  * an expression whose result is the new value of the global variable
4314
4308
  */
4315
4309
  rb_define_method(rb_cGASGN, "value", node_value, 0);
4316
4310
  rb_ary_push(members, rb_str_new2("value"));
4311
+
4312
+ /* Document-method: vid
4313
+ * the name of the global variable, with a leading '$' character.
4314
+ */
4315
+ rb_define_method(rb_cGASGN, "vid", node_vid, 0);
4316
+ rb_ary_push(members, rb_str_new2("vid"));
4317
4317
  rb_define_method(rb_cGASGN, "entry", node_entry, 0);
4318
4318
  rb_ary_push(members, rb_str_new2("entry"));
4319
4319
  }
@@ -4368,17 +4368,17 @@ void define_node_subclass_methods()
4368
4368
  rb_iv_set(rb_cIASGN, "__type__", INT2NUM(NODE_IASGN));
4369
4369
  rb_define_singleton_method(rb_cIASGN, "members", node_s_members, 0);
4370
4370
 
4371
- /* Document-method: vid
4372
- * the name of the instance variable, with a leading '@' sign
4373
- */
4374
- rb_define_method(rb_cIASGN, "vid", node_vid, 0);
4375
- rb_ary_push(members, rb_str_new2("vid"));
4376
-
4377
4371
  /* Document-method: value
4378
4372
  * the value to assign to the instance variable
4379
4373
  */
4380
4374
  rb_define_method(rb_cIASGN, "value", node_value, 0);
4381
4375
  rb_ary_push(members, rb_str_new2("value"));
4376
+
4377
+ /* Document-method: vid
4378
+ * the name of the instance variable, with a leading '@' sign
4379
+ */
4380
+ rb_define_method(rb_cIASGN, "vid", node_vid, 0);
4381
+ rb_ary_push(members, rb_str_new2("vid"));
4382
4382
  }
4383
4383
 
4384
4384
  /* Document-class: Node::IF
@@ -4401,6 +4401,7 @@ void define_node_subclass_methods()
4401
4401
  *
4402
4402
  * A conditional block using elsif has another IF node as the else
4403
4403
  * expression.
4404
+ *
4404
4405
  */
4405
4406
  {
4406
4407
  VALUE rb_cIF = rb_define_class_under(rb_cNode, "IF", rb_cNode);
@@ -4410,12 +4411,11 @@ void define_node_subclass_methods()
4410
4411
  rb_iv_set(rb_cIF, "__type__", INT2NUM(NODE_IF));
4411
4412
  rb_define_singleton_method(rb_cIF, "members", node_s_members, 0);
4412
4413
 
4413
- /* Document-method: else
4414
- * the expression to evaluate if the expression is false, or false
4415
- * if the expression is empty
4414
+ /* Document-method: cond
4415
+ * the condition to evaluate
4416
4416
  */
4417
- rb_define_method(rb_cIF, "else", node_else, 0);
4418
- rb_ary_push(members, rb_str_new2("else"));
4417
+ rb_define_method(rb_cIF, "cond", node_cond, 0);
4418
+ rb_ary_push(members, rb_str_new2("cond"));
4419
4419
 
4420
4420
  /* Document-method: body
4421
4421
  * the expression to evaluate if the expression is true, or false
@@ -4424,11 +4424,12 @@ void define_node_subclass_methods()
4424
4424
  rb_define_method(rb_cIF, "body", node_body, 0);
4425
4425
  rb_ary_push(members, rb_str_new2("body"));
4426
4426
 
4427
- /* Document-method: cond
4428
- * the condition to evaluate
4427
+ /* Document-method: else
4428
+ * the expression to evaluate if the expression is false, or false
4429
+ * if the expression is empty
4429
4430
  */
4430
- rb_define_method(rb_cIF, "cond", node_cond, 0);
4431
- rb_ary_push(members, rb_str_new2("cond"));
4431
+ rb_define_method(rb_cIF, "else", node_else, 0);
4432
+ rb_ary_push(members, rb_str_new2("else"));
4432
4433
  }
4433
4434
 
4434
4435
  /* Document-class: Node::IFUNC
@@ -4448,18 +4449,18 @@ void define_node_subclass_methods()
4448
4449
  rb_define_method(rb_cIFUNC, "cfnc", node_cfnc, 0);
4449
4450
  rb_ary_push(members, rb_str_new2("cfnc"));
4450
4451
 
4451
- /* Document-method: state
4452
- * always 0
4453
- */
4454
- rb_define_method(rb_cIFUNC, "state", node_state, 0);
4455
- rb_ary_push(members, rb_str_new2("state"));
4456
-
4457
4452
  /* Document-method: tval
4458
4453
  * the user-specified data to be passed as the second argument to
4459
4454
  * cfnc
4460
4455
  */
4461
4456
  rb_define_method(rb_cIFUNC, "tval", node_tval, 0);
4462
4457
  rb_ary_push(members, rb_str_new2("tval"));
4458
+
4459
+ /* Document-method: state
4460
+ * always 0
4461
+ */
4462
+ rb_define_method(rb_cIFUNC, "state", node_state, 0);
4463
+ rb_ary_push(members, rb_str_new2("state"));
4463
4464
  }
4464
4465
 
4465
4466
  /* Document-class: Node::ITER
@@ -4537,17 +4538,17 @@ void define_node_subclass_methods()
4537
4538
  rb_iv_set(rb_cLASGN, "__type__", INT2NUM(NODE_LASGN));
4538
4539
  rb_define_singleton_method(rb_cLASGN, "members", node_s_members, 0);
4539
4540
 
4540
- /* Document-method: vid
4541
- * the name of the local variable
4542
- */
4543
- rb_define_method(rb_cLASGN, "vid", node_vid, 0);
4544
- rb_ary_push(members, rb_str_new2("vid"));
4545
-
4546
4541
  /* Document-method: value
4547
4542
  * the value to assign to the local variable
4548
4543
  */
4549
4544
  rb_define_method(rb_cLASGN, "value", node_value, 0);
4550
4545
  rb_ary_push(members, rb_str_new2("value"));
4546
+
4547
+ /* Document-method: vid
4548
+ * the name of the local variable
4549
+ */
4550
+ rb_define_method(rb_cLASGN, "vid", node_vid, 0);
4551
+ rb_ary_push(members, rb_str_new2("vid"));
4551
4552
  rb_define_method(rb_cLASGN, "cnt", node_cnt, 0);
4552
4553
  rb_ary_push(members, rb_str_new2("cnt"));
4553
4554
  }
@@ -4602,6 +4603,12 @@ void define_node_subclass_methods()
4602
4603
  rb_iv_set(rb_cMASGN, "__type__", INT2NUM(NODE_MASGN));
4603
4604
  rb_define_singleton_method(rb_cMASGN, "members", node_s_members, 0);
4604
4605
 
4606
+ /* Document-method: args
4607
+ * TODO
4608
+ */
4609
+ rb_define_method(rb_cMASGN, "args", node_args, 0);
4610
+ rb_ary_push(members, rb_str_new2("args"));
4611
+
4605
4612
  /* Document-method: head
4606
4613
  * TODO
4607
4614
  */
@@ -4613,12 +4620,6 @@ void define_node_subclass_methods()
4613
4620
  */
4614
4621
  rb_define_method(rb_cMASGN, "value", node_value, 0);
4615
4622
  rb_ary_push(members, rb_str_new2("value"));
4616
-
4617
- /* Document-method: args
4618
- * TODO
4619
- */
4620
- rb_define_method(rb_cMASGN, "args", node_args, 0);
4621
- rb_ary_push(members, rb_str_new2("args"));
4622
4623
  }
4623
4624
 
4624
4625
  /* Document-class: Node::MATCH
@@ -4643,17 +4644,17 @@ void define_node_subclass_methods()
4643
4644
  rb_iv_set(rb_cMATCH, "__type__", INT2NUM(NODE_MATCH));
4644
4645
  rb_define_singleton_method(rb_cMATCH, "members", node_s_members, 0);
4645
4646
 
4646
- /* Document-method: value
4647
- * the value to compare against
4648
- */
4649
- rb_define_method(rb_cMATCH, "value", node_value, 0);
4650
- rb_ary_push(members, rb_str_new2("value"));
4651
-
4652
4647
  /* Document-method: lit
4653
4648
  * the regular expression to use in the condition.
4654
4649
  */
4655
4650
  rb_define_method(rb_cMATCH, "lit", node_lit, 0);
4656
4651
  rb_ary_push(members, rb_str_new2("lit"));
4652
+
4653
+ /* Document-method: value
4654
+ * the value to compare against
4655
+ */
4656
+ rb_define_method(rb_cMATCH, "value", node_value, 0);
4657
+ rb_ary_push(members, rb_str_new2("value"));
4657
4658
  }
4658
4659
 
4659
4660
  /* Document-class: Node::MATCH2
@@ -4759,17 +4760,17 @@ void define_node_subclass_methods()
4759
4760
  rb_iv_set(rb_cMETHOD, "__type__", INT2NUM(NODE_METHOD));
4760
4761
  rb_define_singleton_method(rb_cMETHOD, "members", node_s_members, 0);
4761
4762
 
4762
- /* Document-method: body
4763
- * the body of the method
4764
- */
4765
- rb_define_method(rb_cMETHOD, "body", node_body, 0);
4766
- rb_ary_push(members, rb_str_new2("body"));
4767
-
4768
4763
  /* Document-method: noex
4769
4764
  * the method's flags
4770
4765
  */
4771
4766
  rb_define_method(rb_cMETHOD, "noex", node_noex, 0);
4772
4767
  rb_ary_push(members, rb_str_new2("noex"));
4768
+
4769
+ /* Document-method: body
4770
+ * the body of the method
4771
+ */
4772
+ rb_define_method(rb_cMETHOD, "body", node_body, 0);
4773
+ rb_ary_push(members, rb_str_new2("body"));
4773
4774
  }
4774
4775
 
4775
4776
  /* Document-class: Node::MODULE
@@ -4791,17 +4792,17 @@ void define_node_subclass_methods()
4791
4792
  rb_iv_set(rb_cMODULE, "__type__", INT2NUM(NODE_MODULE));
4792
4793
  rb_define_singleton_method(rb_cMODULE, "members", node_s_members, 0);
4793
4794
 
4794
- /* Document-method: body
4795
- * the body of the module definition
4796
- */
4797
- rb_define_method(rb_cMODULE, "body", node_body, 0);
4798
- rb_ary_push(members, rb_str_new2("body"));
4799
-
4800
4795
  /* Document-method: cpath
4801
4796
  * the name of the module to define
4802
4797
  */
4803
4798
  rb_define_method(rb_cMODULE, "cpath", node_cpath, 0);
4804
4799
  rb_ary_push(members, rb_str_new2("cpath"));
4800
+
4801
+ /* Document-method: body
4802
+ * the body of the module definition
4803
+ */
4804
+ rb_define_method(rb_cMODULE, "body", node_body, 0);
4805
+ rb_ary_push(members, rb_str_new2("body"));
4805
4806
  }
4806
4807
 
4807
4808
  /* Document-class: Node::NEWLINE
@@ -4943,12 +4944,6 @@ void define_node_subclass_methods()
4943
4944
  rb_iv_set(rb_cOP_ASGN1, "__type__", INT2NUM(NODE_OP_ASGN1));
4944
4945
  rb_define_singleton_method(rb_cOP_ASGN1, "members", node_s_members, 0);
4945
4946
 
4946
- /* Document-method: recv
4947
- * the receiver of the assignment
4948
- */
4949
- rb_define_method(rb_cOP_ASGN1, "recv", node_recv, 0);
4950
- rb_ary_push(members, rb_str_new2("recv"));
4951
-
4952
4947
  /* Document-method: args
4953
4948
  * the arguments to the assigment
4954
4949
  */
@@ -4961,6 +4956,12 @@ void define_node_subclass_methods()
4961
4956
  */
4962
4957
  rb_define_method(rb_cOP_ASGN1, "mid", node_mid, 0);
4963
4958
  rb_ary_push(members, rb_str_new2("mid"));
4959
+
4960
+ /* Document-method: recv
4961
+ * the receiver of the assignment
4962
+ */
4963
+ rb_define_method(rb_cOP_ASGN1, "recv", node_recv, 0);
4964
+ rb_ary_push(members, rb_str_new2("recv"));
4964
4965
  }
4965
4966
 
4966
4967
  /* Document-class: Node::OP_ASGN2
@@ -4989,18 +4990,18 @@ void define_node_subclass_methods()
4989
4990
  rb_define_method(rb_cOP_ASGN2, "recv", node_recv, 0);
4990
4991
  rb_ary_push(members, rb_str_new2("recv"));
4991
4992
 
4992
- /* Document-method: value
4993
- * the value to assign to the attribute
4994
- */
4995
- rb_define_method(rb_cOP_ASGN2, "value", node_value, 0);
4996
- rb_ary_push(members, rb_str_new2("value"));
4997
-
4998
4993
  /* Document-method: next
4999
4994
  * another node of type OP_ASGN2 which contains more information
5000
4995
  * about the assignment operation than can fit in this node alone
5001
4996
  */
5002
4997
  rb_define_method(rb_cOP_ASGN2, "next", node_next, 0);
5003
4998
  rb_ary_push(members, rb_str_new2("next"));
4999
+
5000
+ /* Document-method: value
5001
+ * the value to assign to the attribute
5002
+ */
5003
+ rb_define_method(rb_cOP_ASGN2, "value", node_value, 0);
5004
+ rb_ary_push(members, rb_str_new2("value"));
5004
5005
  }
5005
5006
 
5006
5007
  /* Document-class: Node::OP_ASGN2_ARG
@@ -5083,11 +5084,13 @@ void define_node_subclass_methods()
5083
5084
  rb_iv_set(rb_cOP_ASGN_OR, "__type__", INT2NUM(NODE_OP_ASGN_OR));
5084
5085
  rb_define_singleton_method(rb_cOP_ASGN_OR, "members", node_s_members, 0);
5085
5086
 
5086
- /* Document-method: recv
5087
- * the receiver of the assignment
5087
+ /* Document-method: aid
5088
+ * if this indicator is nonzero, ruby will check to see if the
5089
+ * provided expression is defined, otherwise it will assume that
5090
+ * the provided expression is defined.
5088
5091
  */
5089
- rb_define_method(rb_cOP_ASGN_OR, "recv", node_recv, 0);
5090
- rb_ary_push(members, rb_str_new2("recv"));
5092
+ rb_define_method(rb_cOP_ASGN_OR, "aid", node_aid, 0);
5093
+ rb_ary_push(members, rb_str_new2("aid"));
5091
5094
 
5092
5095
  /* Document-method: value
5093
5096
  * the right hand side of the assignment
@@ -5095,13 +5098,11 @@ void define_node_subclass_methods()
5095
5098
  rb_define_method(rb_cOP_ASGN_OR, "value", node_value, 0);
5096
5099
  rb_ary_push(members, rb_str_new2("value"));
5097
5100
 
5098
- /* Document-method: aid
5099
- * if this indicator is nonzero, ruby will check to see if the
5100
- * provided expression is defined, otherwise it will assume that
5101
- * the provided expression is defined.
5101
+ /* Document-method: recv
5102
+ * the receiver of the assignment
5102
5103
  */
5103
- rb_define_method(rb_cOP_ASGN_OR, "aid", node_aid, 0);
5104
- rb_ary_push(members, rb_str_new2("aid"));
5104
+ rb_define_method(rb_cOP_ASGN_OR, "recv", node_recv, 0);
5105
+ rb_ary_push(members, rb_str_new2("recv"));
5105
5106
  }
5106
5107
 
5107
5108
  /* Document-class: Node::OR
@@ -5237,12 +5238,6 @@ void define_node_subclass_methods()
5237
5238
  rb_iv_set(rb_cRESCUE, "__type__", INT2NUM(NODE_RESCUE));
5238
5239
  rb_define_singleton_method(rb_cRESCUE, "members", node_s_members, 0);
5239
5240
 
5240
- /* Document-method: else
5241
- * the expression to be evaluated if no exception is raised
5242
- */
5243
- rb_define_method(rb_cRESCUE, "else", node_else, 0);
5244
- rb_ary_push(members, rb_str_new2("else"));
5245
-
5246
5241
  /* Document-method: head
5247
5242
  * the body of the block to evaluate
5248
5243
  */
@@ -5254,6 +5249,12 @@ void define_node_subclass_methods()
5254
5249
  */
5255
5250
  rb_define_method(rb_cRESCUE, "resq", node_resq, 0);
5256
5251
  rb_ary_push(members, rb_str_new2("resq"));
5252
+
5253
+ /* Document-method: else
5254
+ * the expression to be evaluated if no exception is raised
5255
+ */
5256
+ rb_define_method(rb_cRESCUE, "else", node_else, 0);
5257
+ rb_ary_push(members, rb_str_new2("else"));
5257
5258
  }
5258
5259
 
5259
5260
  /* Document-class: Node::RETRY
@@ -5343,13 +5344,6 @@ void define_node_subclass_methods()
5343
5344
  rb_iv_set(rb_cSCOPE, "__type__", INT2NUM(NODE_SCOPE));
5344
5345
  rb_define_singleton_method(rb_cSCOPE, "members", node_s_members, 0);
5345
5346
 
5346
- /* Document-method: rval
5347
- * holds information about which class(es) to search for constants
5348
- * in this scope
5349
- */
5350
- rb_define_method(rb_cSCOPE, "rval", node_rval, 0);
5351
- rb_ary_push(members, rb_str_new2("rval"));
5352
-
5353
5347
  /* Document-method: tbl
5354
5348
  * the names of the local variables* next the first expression in
5355
5349
  * the scope
@@ -5357,6 +5351,13 @@ void define_node_subclass_methods()
5357
5351
  rb_define_method(rb_cSCOPE, "tbl", node_tbl, 0);
5358
5352
  rb_ary_push(members, rb_str_new2("tbl"));
5359
5353
 
5354
+ /* Document-method: rval
5355
+ * holds information about which class(es) to search for constants
5356
+ * in this scope
5357
+ */
5358
+ rb_define_method(rb_cSCOPE, "rval", node_rval, 0);
5359
+ rb_ary_push(members, rb_str_new2("rval"));
5360
+
5360
5361
  /* Document-method: next
5361
5362
  * the body of the lexical scope
5362
5363
  */
@@ -5557,10 +5558,10 @@ void define_node_subclass_methods()
5557
5558
  rb_iv_set(rb_cVALIAS, "__member__", members);
5558
5559
  rb_iv_set(rb_cVALIAS, "__type__", INT2NUM(NODE_VALIAS));
5559
5560
  rb_define_singleton_method(rb_cVALIAS, "members", node_s_members, 0);
5560
- rb_define_method(rb_cVALIAS, "second", node_2nd, 0);
5561
- rb_ary_push(members, rb_str_new2("second"));
5562
5561
  rb_define_method(rb_cVALIAS, "first", node_1st, 0);
5563
5562
  rb_ary_push(members, rb_str_new2("first"));
5563
+ rb_define_method(rb_cVALIAS, "second", node_2nd, 0);
5564
+ rb_ary_push(members, rb_str_new2("second"));
5564
5565
  }
5565
5566
 
5566
5567
  /* Document-class: Node::VCALL