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.
- data/Rakefile +1 -1
- data/bin/ruby-internal-node-dump +1 -1
- data/bin/ruby-internal-obfuscate +1 -1
- data/ext/cached/ruby-1.8.4/internal/node/node_type_descrip.c +45 -45
- data/ext/cached/ruby-1.8.4/internal/node/nodeinfo.c +259 -258
- data/ext/cached/ruby-1.8.5/internal/node/node_type_descrip.c +43 -43
- data/ext/cached/ruby-1.8.5/internal/node/nodeinfo.c +261 -260
- data/ext/cached/ruby-1.8.6/internal/node/node_type_descrip.c +45 -45
- data/ext/cached/ruby-1.8.6/internal/node/nodeinfo.c +261 -260
- data/ext/cached/ruby-1.8.7/internal/node/node_type_descrip.c +37 -37
- data/ext/cached/ruby-1.8.7/internal/node/nodeinfo.c +219 -218
- data/ext/cached/ruby-1.9.1/internal/node/global_entry.h +4 -0
- data/ext/cached/ruby-1.9.1/internal/node/node_type_descrip.c +41 -41
- data/ext/cached/ruby-1.9.1/internal/node/nodeinfo.c +231 -230
- data/ext/cached/ruby-1.9.2/internal/node/global_entry.h +4 -0
- data/ext/cached/ruby-1.9.2/internal/node/node_type_descrip.c +37 -37
- data/ext/cached/ruby-1.9.2/internal/node/nodeinfo.c +206 -205
- data/ext/cached/ruby-1.9.3/internal/node/global_entry.h +4 -0
- data/ext/cached/ruby-1.9.3/internal/node/node_type_descrip.c +41 -41
- data/ext/cached/ruby-1.9.3/internal/node/nodeinfo.c +230 -229
- data/ext/internal/binding/block.h +0 -20
- data/ext/internal/method/internal_method.h +5 -5
- data/ext/internal/module/classpath.c +13 -18
- data/ext/internal/module/classpath.h +3 -3
- data/ext/internal/module/getcfp.h +12 -0
- data/ext/internal/node/block.h +0 -20
- data/ext/internal/node/global_entry.h +31 -42
- data/ext/internal/node/global_entry.h.rpp +1 -1
- data/ext/internal/node/node_type_descrip.c +38 -47
- data/ext/internal/node/nodeinfo.c +311 -626
- data/ext/internal/node/nodeinfo.h +4 -1
- data/ext/internal/proc/block.h +0 -20
- data/ext/internal/tag/tag.h +0 -10
- data/ext/internal/vm/instruction/insns_info.c +5974 -3
- data/ext/internal/vm/instruction/insns_info.h +878 -0
- metadata +37 -51
@@ -4,42 +4,42 @@
|
|
4
4
|
Node_Type_Descrip node_type_descrips_unsorted[] = {
|
5
5
|
{ NODE_ALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "ALIAS" },
|
6
6
|
#ifdef HAVE_NODE_ALLOCA
|
7
|
-
{ NODE_ALLOCA, NEN_CFNC,
|
7
|
+
{ NODE_ALLOCA, NEN_CFNC, NEN_VALUE, NEN_CNT, "ALLOCA" },
|
8
8
|
#endif
|
9
|
-
{ NODE_AND,
|
10
|
-
{ NODE_ARGS,
|
11
|
-
{ NODE_ARGSCAT,
|
12
|
-
{ NODE_ARGSPUSH,
|
13
|
-
{ NODE_ARRAY, NEN_ALEN,
|
14
|
-
{ NODE_ATTRASGN,
|
9
|
+
{ NODE_AND, NEN_2ND, NEN_1ST, NEN_NONE, "AND" },
|
10
|
+
{ NODE_ARGS, NEN_REST, NEN_OPT, NEN_CNT, "ARGS" },
|
11
|
+
{ NODE_ARGSCAT, NEN_HEAD, NEN_BODY, NEN_NONE, "ARGSCAT" },
|
12
|
+
{ NODE_ARGSPUSH, NEN_HEAD, NEN_BODY, NEN_NONE, "ARGSPUSH" },
|
13
|
+
{ NODE_ARRAY, NEN_ALEN, NEN_HEAD, NEN_NEXT, "ARRAY" },
|
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" },
|
17
17
|
{ NODE_BEGIN, NEN_BODY, NEN_NONE, NEN_NONE, "BEGIN" },
|
18
|
-
{ NODE_BLOCK,
|
18
|
+
{ NODE_BLOCK, NEN_HEAD, NEN_NEXT, NEN_NONE, "BLOCK" },
|
19
19
|
{ NODE_BLOCK_ARG, NEN_CNT, NEN_NONE, NEN_NONE, "BLOCK_ARG" },
|
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_MID, NEN_RECV,
|
24
|
-
{ NODE_CASE, NEN_BODY, NEN_NEXT,
|
25
|
-
{ NODE_CDECL,
|
23
|
+
{ NODE_CALL, NEN_ARGS, NEN_MID, NEN_RECV, "CALL" },
|
24
|
+
{ NODE_CASE, NEN_HEAD, NEN_BODY, NEN_NEXT, "CASE" },
|
25
|
+
{ NODE_CDECL, NEN_VALUE, NEN_VID, NEN_NONE, "CDECL" },
|
26
26
|
{ NODE_CFUNC, NEN_CFNC, NEN_ARGC, NEN_NONE, "CFUNC" },
|
27
|
-
{ NODE_CLASS,
|
28
|
-
{ NODE_COLON2,
|
27
|
+
{ NODE_CLASS, NEN_SUPER, NEN_CPATH, NEN_BODY, "CLASS" },
|
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,
|
31
|
+
{ NODE_CREF, NEN_CLSS, NEN_BODY, NEN_NEXT, "CREF" },
|
32
32
|
{ NODE_CVAR, NEN_VID, NEN_NONE, NEN_NONE, "CVAR" },
|
33
|
-
{ NODE_CVASGN,
|
34
|
-
{ NODE_CVDECL,
|
35
|
-
{ NODE_DASGN,
|
36
|
-
{ NODE_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,
|
39
|
-
{ NODE_DEFS,
|
38
|
+
{ NODE_DEFN, NEN_DEFN, NEN_MID, NEN_NOEX, "DEFN" },
|
39
|
+
{ NODE_DEFS, NEN_DEFN, NEN_RECV, NEN_MID, "DEFS" },
|
40
40
|
{ NODE_DMETHOD, NEN_CVAL, NEN_NONE, NEN_NONE, "DMETHOD" },
|
41
|
-
{ NODE_DOT2,
|
42
|
-
{ NODE_DOT3,
|
41
|
+
{ NODE_DOT2, NEN_BEG, NEN_END, NEN_STATE, "DOT2" },
|
42
|
+
{ NODE_DOT3, NEN_BEG, NEN_END, NEN_STATE, "DOT3" },
|
43
43
|
{ NODE_DREGX, NEN_LIT, NEN_NEXT, NEN_CFLAG, "DREGX" },
|
44
44
|
{ NODE_DREGX_ONCE, NEN_LIT, NEN_NEXT, NEN_CFLAG, "DREGX_ONCE" },
|
45
45
|
{ NODE_DSTR, NEN_LIT, NEN_NEXT, NEN_NONE, "DSTR" },
|
@@ -49,45 +49,45 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
|
|
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,
|
53
|
-
{ NODE_FCALL,
|
54
|
-
{ NODE_FLIP2, NEN_CNT,
|
55
|
-
{ NODE_FLIP3, NEN_CNT,
|
52
|
+
{ NODE_FBODY, NEN_ORIG, NEN_MID, NEN_HEAD, "FBODY" },
|
53
|
+
{ NODE_FCALL, NEN_ARGS, NEN_MID, NEN_NONE, "FCALL" },
|
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,
|
58
|
-
{ NODE_GVAR,
|
57
|
+
{ NODE_GASGN, NEN_VALUE, NEN_VID, NEN_ENTRY, "GASGN" },
|
58
|
+
{ NODE_GVAR, NEN_VID, NEN_ENTRY, NEN_NONE, "GVAR" },
|
59
59
|
{ NODE_HASH, NEN_HEAD, NEN_NONE, NEN_NONE, "HASH" },
|
60
|
-
{ NODE_IASGN,
|
61
|
-
{ NODE_IF,
|
62
|
-
{ NODE_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,
|
65
|
+
{ NODE_LASGN, NEN_VALUE, NEN_VID, NEN_CNT, "LASGN" },
|
66
66
|
{ NODE_LIT, NEN_LIT, NEN_NONE, NEN_NONE, "LIT" },
|
67
|
-
{ NODE_LVAR,
|
67
|
+
{ NODE_LVAR, NEN_VID, NEN_CNT, NEN_NONE, "LVAR" },
|
68
68
|
{ NODE_MASGN, NEN_ARGS, NEN_HEAD, NEN_VALUE, "MASGN" },
|
69
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,
|
74
|
-
{ NODE_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_MID, NEN_RECV,
|
81
|
+
{ NODE_OP_ASGN1, NEN_ARGS, NEN_MID, NEN_RECV, "OP_ASGN1" },
|
82
82
|
{ NODE_OP_ASGN2, NEN_RECV, NEN_NEXT, NEN_VALUE, "OP_ASGN2" },
|
83
|
-
{ NODE_OP_ASGN2_ARG, NEN_AID, NEN_MID,
|
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_AID,
|
86
|
-
{ NODE_OR,
|
85
|
+
{ NODE_OP_ASGN_OR, NEN_AID, NEN_VALUE, NEN_RECV, "OP_ASGN_OR" },
|
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
|
-
{ NODE_RESBODY,
|
90
|
-
{ NODE_RESCUE,
|
89
|
+
{ NODE_RESBODY, NEN_HEAD, NEN_BODY, NEN_ARGS, "RESBODY" },
|
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" },
|
@@ -100,13 +100,13 @@ Node_Type_Descrip node_type_descrips_unsorted[] = {
|
|
100
100
|
{ NODE_TO_ARY, NEN_HEAD, NEN_NONE, NEN_NONE, "TO_ARY" },
|
101
101
|
{ NODE_TRUE, NEN_NONE, NEN_NONE, NEN_NONE, "TRUE" },
|
102
102
|
{ NODE_UNDEF, NEN_BODY, NEN_NONE, NEN_NONE, "UNDEF" },
|
103
|
-
{ NODE_UNTIL, NEN_BODY,
|
103
|
+
{ NODE_UNTIL, NEN_BODY, NEN_COND, NEN_STATE, "UNTIL" },
|
104
104
|
{ NODE_VALIAS, NEN_1ST, NEN_2ND, NEN_NONE, "VALIAS" },
|
105
105
|
{ NODE_VCALL, NEN_MID, NEN_NONE, NEN_NONE, "VCALL" },
|
106
|
-
{ NODE_WHEN, NEN_BODY, NEN_NEXT,
|
107
|
-
{ NODE_WHILE, NEN_BODY,
|
106
|
+
{ NODE_WHEN, NEN_HEAD, NEN_BODY, NEN_NEXT, "WHEN" },
|
107
|
+
{ NODE_WHILE, NEN_BODY, NEN_COND, NEN_STATE, "WHILE" },
|
108
108
|
{ NODE_XSTR, NEN_LIT, NEN_NONE, NEN_NONE, "XSTR" },
|
109
|
-
{ NODE_YIELD,
|
109
|
+
{ NODE_YIELD, NEN_HEAD, NEN_STATE, NEN_NONE, "YIELD" },
|
110
110
|
{ NODE_ZARRAY, NEN_NONE, NEN_NONE, NEN_NONE, "ZARRAY" },
|
111
111
|
{ NODE_ZSUPER, NEN_NONE, NEN_NONE, NEN_NONE, "ZSUPER" },
|
112
112
|
{ NODE_LAST, NEN_NONE, NEN_NONE, NEN_NONE, "LAST" },
|
@@ -2952,17 +2952,17 @@ void define_node_subclass_methods()
|
|
2952
2952
|
rb_define_method(rb_cALLOCA, "cfnc", node_cfnc, 0);
|
2953
2953
|
rb_ary_push(members, rb_str_new2("cfnc"));
|
2954
2954
|
|
2955
|
-
/* Document-method: cnt
|
2956
|
-
* the number of bytes allocated
|
2957
|
-
*/
|
2958
|
-
rb_define_method(rb_cALLOCA, "cnt", node_cnt, 0);
|
2959
|
-
rb_ary_push(members, rb_str_new2("cnt"));
|
2960
|
-
|
2961
2955
|
/* Document-method: value
|
2962
2956
|
* a pointer to the previously allocated temporary node
|
2963
2957
|
*/
|
2964
2958
|
rb_define_method(rb_cALLOCA, "value", node_value, 0);
|
2965
2959
|
rb_ary_push(members, rb_str_new2("value"));
|
2960
|
+
|
2961
|
+
/* Document-method: cnt
|
2962
|
+
* the number of bytes allocated
|
2963
|
+
*/
|
2964
|
+
rb_define_method(rb_cALLOCA, "cnt", node_cnt, 0);
|
2965
|
+
rb_ary_push(members, rb_str_new2("cnt"));
|
2966
2966
|
}
|
2967
2967
|
#endif
|
2968
2968
|
|
@@ -2981,17 +2981,17 @@ void define_node_subclass_methods()
|
|
2981
2981
|
rb_iv_set(rb_cAND, "__type__", INT2NUM(NODE_AND));
|
2982
2982
|
rb_define_singleton_method(rb_cAND, "members", node_s_members, 0);
|
2983
2983
|
|
2984
|
-
/* Document-method: first
|
2985
|
-
* the expression on the left hand side
|
2986
|
-
*/
|
2987
|
-
rb_define_method(rb_cAND, "first", node_1st, 0);
|
2988
|
-
rb_ary_push(members, rb_str_new2("first"));
|
2989
|
-
|
2990
2984
|
/* Document-method: second
|
2991
2985
|
* the expression on the right hand side
|
2992
2986
|
*/
|
2993
2987
|
rb_define_method(rb_cAND, "second", node_2nd, 0);
|
2994
2988
|
rb_ary_push(members, rb_str_new2("second"));
|
2989
|
+
|
2990
|
+
/* Document-method: first
|
2991
|
+
* the expression on the left hand side
|
2992
|
+
*/
|
2993
|
+
rb_define_method(rb_cAND, "first", node_1st, 0);
|
2994
|
+
rb_ary_push(members, rb_str_new2("first"));
|
2995
2995
|
}
|
2996
2996
|
|
2997
2997
|
/* Document-class: Node::ARGS
|
@@ -3005,12 +3005,6 @@ 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: cnt
|
3009
|
-
* the number of required arguments
|
3010
|
-
*/
|
3011
|
-
rb_define_method(rb_cARGS, "cnt", node_cnt, 0);
|
3012
|
-
rb_ary_push(members, rb_str_new2("cnt"));
|
3013
|
-
|
3014
3008
|
/* Document-method: rest
|
3015
3009
|
* an assignment node to assign the rest arg, if it is present
|
3016
3010
|
*/
|
@@ -3023,6 +3017,12 @@ void define_node_subclass_methods()
|
|
3023
3017
|
*/
|
3024
3018
|
rb_define_method(rb_cARGS, "opt", node_opt, 0);
|
3025
3019
|
rb_ary_push(members, rb_str_new2("opt"));
|
3020
|
+
|
3021
|
+
/* Document-method: cnt
|
3022
|
+
* the number of required arguments
|
3023
|
+
*/
|
3024
|
+
rb_define_method(rb_cARGS, "cnt", node_cnt, 0);
|
3025
|
+
rb_ary_push(members, rb_str_new2("cnt"));
|
3026
3026
|
}
|
3027
3027
|
|
3028
3028
|
/* Document-class: Node::ARGSCAT
|
@@ -3042,18 +3042,18 @@ void define_node_subclass_methods()
|
|
3042
3042
|
rb_iv_set(rb_cARGSCAT, "__type__", INT2NUM(NODE_ARGSCAT));
|
3043
3043
|
rb_define_singleton_method(rb_cARGSCAT, "members", node_s_members, 0);
|
3044
3044
|
|
3045
|
+
/* Document-method: head
|
3046
|
+
* a list of fixed arguments
|
3047
|
+
*/
|
3048
|
+
rb_define_method(rb_cARGSCAT, "head", node_head, 0);
|
3049
|
+
rb_ary_push(members, rb_str_new2("head"));
|
3050
|
+
|
3045
3051
|
/* Document-method: body
|
3046
3052
|
* the last argument, which will be splatted onto the end of the
|
3047
3053
|
* fixed arguments
|
3048
3054
|
*/
|
3049
3055
|
rb_define_method(rb_cARGSCAT, "body", node_body, 0);
|
3050
3056
|
rb_ary_push(members, rb_str_new2("body"));
|
3051
|
-
|
3052
|
-
/* Document-method: head
|
3053
|
-
* a list of fixed arguments
|
3054
|
-
*/
|
3055
|
-
rb_define_method(rb_cARGSCAT, "head", node_head, 0);
|
3056
|
-
rb_ary_push(members, rb_str_new2("head"));
|
3057
3057
|
}
|
3058
3058
|
|
3059
3059
|
/* Document-class: Node::ARGSPUSH
|
@@ -3070,10 +3070,10 @@ void define_node_subclass_methods()
|
|
3070
3070
|
rb_iv_set(rb_cARGSPUSH, "__member__", members);
|
3071
3071
|
rb_iv_set(rb_cARGSPUSH, "__type__", INT2NUM(NODE_ARGSPUSH));
|
3072
3072
|
rb_define_singleton_method(rb_cARGSPUSH, "members", node_s_members, 0);
|
3073
|
-
rb_define_method(rb_cARGSPUSH, "body", node_body, 0);
|
3074
|
-
rb_ary_push(members, rb_str_new2("body"));
|
3075
3073
|
rb_define_method(rb_cARGSPUSH, "head", node_head, 0);
|
3076
3074
|
rb_ary_push(members, rb_str_new2("head"));
|
3075
|
+
rb_define_method(rb_cARGSPUSH, "body", node_body, 0);
|
3076
|
+
rb_ary_push(members, rb_str_new2("body"));
|
3077
3077
|
}
|
3078
3078
|
|
3079
3079
|
/* Document-class: Node::ARRAY
|
@@ -3091,17 +3091,17 @@ void define_node_subclass_methods()
|
|
3091
3091
|
rb_define_method(rb_cARRAY, "alen", node_alen, 0);
|
3092
3092
|
rb_ary_push(members, rb_str_new2("alen"));
|
3093
3093
|
|
3094
|
-
/* Document-method: next
|
3095
|
-
* the tail of the array
|
3096
|
-
*/
|
3097
|
-
rb_define_method(rb_cARRAY, "next", node_next, 0);
|
3098
|
-
rb_ary_push(members, rb_str_new2("next"));
|
3099
|
-
|
3100
3094
|
/* Document-method: head
|
3101
3095
|
* the first element of the array
|
3102
3096
|
*/
|
3103
3097
|
rb_define_method(rb_cARRAY, "head", node_head, 0);
|
3104
3098
|
rb_ary_push(members, rb_str_new2("head"));
|
3099
|
+
|
3100
|
+
/* Document-method: next
|
3101
|
+
* the tail of the array
|
3102
|
+
*/
|
3103
|
+
rb_define_method(rb_cARRAY, "next", node_next, 0);
|
3104
|
+
rb_ary_push(members, rb_str_new2("next"));
|
3105
3105
|
}
|
3106
3106
|
|
3107
3107
|
/* Document-class: Node::ATTRASGN
|
@@ -3118,12 +3118,6 @@ void define_node_subclass_methods()
|
|
3118
3118
|
rb_iv_set(rb_cATTRASGN, "__type__", INT2NUM(NODE_ATTRASGN));
|
3119
3119
|
rb_define_singleton_method(rb_cATTRASGN, "members", node_s_members, 0);
|
3120
3120
|
|
3121
|
-
/* Document-method: mid
|
3122
|
-
* the id of the attribute, with a trailing '=' sign
|
3123
|
-
*/
|
3124
|
-
rb_define_method(rb_cATTRASGN, "mid", node_mid, 0);
|
3125
|
-
rb_ary_push(members, rb_str_new2("mid"));
|
3126
|
-
|
3127
3121
|
/* Document-method: recv
|
3128
3122
|
* the receiver of the method
|
3129
3123
|
*/
|
@@ -3135,6 +3129,12 @@ void define_node_subclass_methods()
|
|
3135
3129
|
*/
|
3136
3130
|
rb_define_method(rb_cATTRASGN, "args", node_args, 0);
|
3137
3131
|
rb_ary_push(members, rb_str_new2("args"));
|
3132
|
+
|
3133
|
+
/* Document-method: mid
|
3134
|
+
* the id of the attribute, with a trailing '=' sign
|
3135
|
+
*/
|
3136
|
+
rb_define_method(rb_cATTRASGN, "mid", node_mid, 0);
|
3137
|
+
rb_ary_push(members, rb_str_new2("mid"));
|
3138
3138
|
}
|
3139
3139
|
|
3140
3140
|
/* Document-class: Node::ATTRSET
|
@@ -3222,17 +3222,17 @@ void define_node_subclass_methods()
|
|
3222
3222
|
rb_iv_set(rb_cBLOCK, "__type__", INT2NUM(NODE_BLOCK));
|
3223
3223
|
rb_define_singleton_method(rb_cBLOCK, "members", node_s_members, 0);
|
3224
3224
|
|
3225
|
-
/* Document-method: next
|
3226
|
-
* the second expression in the block of code
|
3227
|
-
*/
|
3228
|
-
rb_define_method(rb_cBLOCK, "next", node_next, 0);
|
3229
|
-
rb_ary_push(members, rb_str_new2("next"));
|
3230
|
-
|
3231
3225
|
/* Document-method: head
|
3232
3226
|
* the first expression in the block of code
|
3233
3227
|
*/
|
3234
3228
|
rb_define_method(rb_cBLOCK, "head", node_head, 0);
|
3235
3229
|
rb_ary_push(members, rb_str_new2("head"));
|
3230
|
+
|
3231
|
+
/* Document-method: next
|
3232
|
+
* the second expression in the block of code
|
3233
|
+
*/
|
3234
|
+
rb_define_method(rb_cBLOCK, "next", node_next, 0);
|
3235
|
+
rb_ary_push(members, rb_str_new2("next"));
|
3236
3236
|
}
|
3237
3237
|
|
3238
3238
|
/* Document-class: Node::BLOCK_ARG
|
@@ -3340,6 +3340,12 @@ 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: args
|
3344
|
+
* the arguments to the method
|
3345
|
+
*/
|
3346
|
+
rb_define_method(rb_cCALL, "args", node_args, 0);
|
3347
|
+
rb_ary_push(members, rb_str_new2("args"));
|
3348
|
+
|
3343
3349
|
/* Document-method: mid
|
3344
3350
|
* the method id
|
3345
3351
|
*/
|
@@ -3351,12 +3357,6 @@ void define_node_subclass_methods()
|
|
3351
3357
|
*/
|
3352
3358
|
rb_define_method(rb_cCALL, "recv", node_recv, 0);
|
3353
3359
|
rb_ary_push(members, rb_str_new2("recv"));
|
3354
|
-
|
3355
|
-
/* Document-method: args
|
3356
|
-
* the arguments to the method
|
3357
|
-
*/
|
3358
|
-
rb_define_method(rb_cCALL, "args", node_args, 0);
|
3359
|
-
rb_ary_push(members, rb_str_new2("args"));
|
3360
3360
|
}
|
3361
3361
|
|
3362
3362
|
/* Document-class: Node::CASE
|
@@ -3374,6 +3374,12 @@ void define_node_subclass_methods()
|
|
3374
3374
|
rb_iv_set(rb_cCASE, "__type__", INT2NUM(NODE_CASE));
|
3375
3375
|
rb_define_singleton_method(rb_cCASE, "members", node_s_members, 0);
|
3376
3376
|
|
3377
|
+
/* Document-method: head
|
3378
|
+
* the value to select on
|
3379
|
+
*/
|
3380
|
+
rb_define_method(rb_cCASE, "head", node_head, 0);
|
3381
|
+
rb_ary_push(members, rb_str_new2("head"));
|
3382
|
+
|
3377
3383
|
/* Document-method: body
|
3378
3384
|
* a linked list of nodes, each node representing a when
|
3379
3385
|
* conditional
|
@@ -3382,12 +3388,6 @@ void define_node_subclass_methods()
|
|
3382
3388
|
rb_ary_push(members, rb_str_new2("body"));
|
3383
3389
|
rb_define_method(rb_cCASE, "next", node_next, 0);
|
3384
3390
|
rb_ary_push(members, rb_str_new2("next"));
|
3385
|
-
|
3386
|
-
/* Document-method: head
|
3387
|
-
* the value to select on
|
3388
|
-
*/
|
3389
|
-
rb_define_method(rb_cCASE, "head", node_head, 0);
|
3390
|
-
rb_ary_push(members, rb_str_new2("head"));
|
3391
3391
|
}
|
3392
3392
|
|
3393
3393
|
/* Document-class: Node::CDECL
|
@@ -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,12 +3455,6 @@ 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
|
3460
|
-
*/
|
3461
|
-
rb_define_method(rb_cCLASS, "body", node_body, 0);
|
3462
|
-
rb_ary_push(members, rb_str_new2("body"));
|
3463
|
-
|
3464
3458
|
/* Document-method: super
|
3465
3459
|
* an expression returning the base class, or false if there is no
|
3466
3460
|
* base class specified
|
@@ -3473,6 +3467,12 @@ void define_node_subclass_methods()
|
|
3473
3467
|
*/
|
3474
3468
|
rb_define_method(rb_cCLASS, "cpath", node_cpath, 0);
|
3475
3469
|
rb_ary_push(members, rb_str_new2("cpath"));
|
3470
|
+
|
3471
|
+
/* Document-method: body
|
3472
|
+
* the body of the class definition
|
3473
|
+
*/
|
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
|
@@ -3491,17 +3491,17 @@ void define_node_subclass_methods()
|
|
3491
3491
|
rb_iv_set(rb_cCOLON2, "__type__", INT2NUM(NODE_COLON2));
|
3492
3492
|
rb_define_singleton_method(rb_cCOLON2, "members", node_s_members, 0);
|
3493
3493
|
|
3494
|
-
/* Document-method: mid
|
3495
|
-
* the name of the method or constant to call/look up
|
3496
|
-
*/
|
3497
|
-
rb_define_method(rb_cCOLON2, "mid", node_mid, 0);
|
3498
|
-
rb_ary_push(members, rb_str_new2("mid"));
|
3499
|
-
|
3500
3494
|
/* Document-method: head
|
3501
3495
|
* an expression specifying the class in which to do the lookup
|
3502
3496
|
*/
|
3503
3497
|
rb_define_method(rb_cCOLON2, "head", node_head, 0);
|
3504
3498
|
rb_ary_push(members, rb_str_new2("head"));
|
3499
|
+
|
3500
|
+
/* Document-method: mid
|
3501
|
+
* the name of the method or constant to call/look up
|
3502
|
+
*/
|
3503
|
+
rb_define_method(rb_cCOLON2, "mid", node_mid, 0);
|
3504
|
+
rb_ary_push(members, rb_str_new2("mid"));
|
3505
3505
|
}
|
3506
3506
|
|
3507
3507
|
/* Document-class: Node::COLON3
|
@@ -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
|
@@ -3741,11 +3741,11 @@ void define_node_subclass_methods()
|
|
3741
3741
|
rb_iv_set(rb_cDEFN, "__type__", INT2NUM(NODE_DEFN));
|
3742
3742
|
rb_define_singleton_method(rb_cDEFN, "members", node_s_members, 0);
|
3743
3743
|
|
3744
|
-
/* Document-method:
|
3745
|
-
* the
|
3744
|
+
/* Document-method: defn
|
3745
|
+
* the body of the method definition
|
3746
3746
|
*/
|
3747
|
-
rb_define_method(rb_cDEFN, "
|
3748
|
-
rb_ary_push(members, rb_str_new2("
|
3747
|
+
rb_define_method(rb_cDEFN, "defn", node_defn, 0);
|
3748
|
+
rb_ary_push(members, rb_str_new2("defn"));
|
3749
3749
|
|
3750
3750
|
/* Document-method: mid
|
3751
3751
|
* the name of the method* defn the body of the method
|
@@ -3753,11 +3753,11 @@ void define_node_subclass_methods()
|
|
3753
3753
|
rb_define_method(rb_cDEFN, "mid", node_mid, 0);
|
3754
3754
|
rb_ary_push(members, rb_str_new2("mid"));
|
3755
3755
|
|
3756
|
-
/* Document-method:
|
3757
|
-
* the
|
3756
|
+
/* Document-method: noex
|
3757
|
+
* the flags which should be used to define the method
|
3758
3758
|
*/
|
3759
|
-
rb_define_method(rb_cDEFN, "
|
3760
|
-
rb_ary_push(members, rb_str_new2("
|
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
|
@@ -3773,12 +3773,6 @@ void define_node_subclass_methods()
|
|
3773
3773
|
rb_iv_set(rb_cDEFS, "__member__", members);
|
3774
3774
|
rb_iv_set(rb_cDEFS, "__type__", INT2NUM(NODE_DEFS));
|
3775
3775
|
rb_define_singleton_method(rb_cDEFS, "members", node_s_members, 0);
|
3776
|
-
|
3777
|
-
/* Document-method: mid
|
3778
|
-
* the name of the method* defn the body of the method
|
3779
|
-
*/
|
3780
|
-
rb_define_method(rb_cDEFS, "mid", node_mid, 0);
|
3781
|
-
rb_ary_push(members, rb_str_new2("mid"));
|
3782
3776
|
rb_define_method(rb_cDEFS, "defn", node_defn, 0);
|
3783
3777
|
rb_ary_push(members, rb_str_new2("defn"));
|
3784
3778
|
|
@@ -3787,6 +3781,12 @@ void define_node_subclass_methods()
|
|
3787
3781
|
*/
|
3788
3782
|
rb_define_method(rb_cDEFS, "recv", node_recv, 0);
|
3789
3783
|
rb_ary_push(members, rb_str_new2("recv"));
|
3784
|
+
|
3785
|
+
/* Document-method: mid
|
3786
|
+
* the name of the method* defn the body of the method
|
3787
|
+
*/
|
3788
|
+
rb_define_method(rb_cDEFS, "mid", node_mid, 0);
|
3789
|
+
rb_ary_push(members, rb_str_new2("mid"));
|
3790
3790
|
}
|
3791
3791
|
|
3792
3792
|
/* Document-class: Node::DMETHOD
|
@@ -3824,20 +3824,20 @@ 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
|
-
|
3830
|
-
/* Document-method: end
|
3831
|
-
* the end of the range
|
3832
|
-
*/
|
3833
|
-
rb_define_method(rb_cDOT2, "end", node_end, 0);
|
3834
|
-
rb_ary_push(members, rb_str_new2("end"));
|
3835
3827
|
|
3836
3828
|
/* Document-method: beg
|
3837
3829
|
* the beginning of the range
|
3838
3830
|
*/
|
3839
3831
|
rb_define_method(rb_cDOT2, "beg", node_beg, 0);
|
3840
3832
|
rb_ary_push(members, rb_str_new2("beg"));
|
3833
|
+
|
3834
|
+
/* Document-method: end
|
3835
|
+
* the end of the range
|
3836
|
+
*/
|
3837
|
+
rb_define_method(rb_cDOT2, "end", node_end, 0);
|
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,20 +3852,20 @@ 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
|
-
|
3858
|
-
/* Document-method: end
|
3859
|
-
* the end of the range
|
3860
|
-
*/
|
3861
|
-
rb_define_method(rb_cDOT3, "end", node_end, 0);
|
3862
|
-
rb_ary_push(members, rb_str_new2("end"));
|
3863
3855
|
|
3864
3856
|
/* Document-method: beg
|
3865
3857
|
* the beginning of the range
|
3866
3858
|
*/
|
3867
3859
|
rb_define_method(rb_cDOT3, "beg", node_beg, 0);
|
3868
3860
|
rb_ary_push(members, rb_str_new2("beg"));
|
3861
|
+
|
3862
|
+
/* Document-method: end
|
3863
|
+
* the end of the range
|
3864
|
+
*/
|
3865
|
+
rb_define_method(rb_cDOT3, "end", node_end, 0);
|
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
|
@@ -4134,18 +4134,18 @@ 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: mid
|
4138
|
-
* the name of the method
|
4139
|
-
*/
|
4140
|
-
rb_define_method(rb_cFBODY, "mid", node_mid, 0);
|
4141
|
-
rb_ary_push(members, rb_str_new2("mid"));
|
4142
|
-
|
4143
4137
|
/* Document-method: orig
|
4144
4138
|
* the origin class
|
4145
4139
|
*/
|
4146
4140
|
rb_define_method(rb_cFBODY, "orig", node_orig, 0);
|
4147
4141
|
rb_ary_push(members, rb_str_new2("orig"));
|
4148
4142
|
|
4143
|
+
/* Document-method: mid
|
4144
|
+
* the name of the method
|
4145
|
+
*/
|
4146
|
+
rb_define_method(rb_cFBODY, "mid", node_mid, 0);
|
4147
|
+
rb_ary_push(members, rb_str_new2("mid"));
|
4148
|
+
|
4149
4149
|
/* Document-method: head
|
4150
4150
|
* the method body
|
4151
4151
|
*/
|
@@ -4168,17 +4168,17 @@ void define_node_subclass_methods()
|
|
4168
4168
|
rb_iv_set(rb_cFCALL, "__type__", INT2NUM(NODE_FCALL));
|
4169
4169
|
rb_define_singleton_method(rb_cFCALL, "members", node_s_members, 0);
|
4170
4170
|
|
4171
|
-
/* Document-method: mid
|
4172
|
-
* the method id
|
4173
|
-
*/
|
4174
|
-
rb_define_method(rb_cFCALL, "mid", node_mid, 0);
|
4175
|
-
rb_ary_push(members, rb_str_new2("mid"));
|
4176
|
-
|
4177
4171
|
/* Document-method: args
|
4178
4172
|
* the arguments to the method
|
4179
4173
|
*/
|
4180
4174
|
rb_define_method(rb_cFCALL, "args", node_args, 0);
|
4181
4175
|
rb_ary_push(members, rb_str_new2("args"));
|
4176
|
+
|
4177
|
+
/* Document-method: mid
|
4178
|
+
* the method id
|
4179
|
+
*/
|
4180
|
+
rb_define_method(rb_cFCALL, "mid", node_mid, 0);
|
4181
|
+
rb_ary_push(members, rb_str_new2("mid"));
|
4182
4182
|
}
|
4183
4183
|
|
4184
4184
|
/* Document-class: Node::FLIP2
|
@@ -4202,17 +4202,17 @@ void define_node_subclass_methods()
|
|
4202
4202
|
rb_define_method(rb_cFLIP2, "cnt", node_cnt, 0);
|
4203
4203
|
rb_ary_push(members, rb_str_new2("cnt"));
|
4204
4204
|
|
4205
|
-
/* Document-method: end
|
4206
|
-
* the end of the range
|
4207
|
-
*/
|
4208
|
-
rb_define_method(rb_cFLIP2, "end", node_end, 0);
|
4209
|
-
rb_ary_push(members, rb_str_new2("end"));
|
4210
|
-
|
4211
4205
|
/* Document-method: beg
|
4212
4206
|
* the beginning of the range
|
4213
4207
|
*/
|
4214
4208
|
rb_define_method(rb_cFLIP2, "beg", node_beg, 0);
|
4215
4209
|
rb_ary_push(members, rb_str_new2("beg"));
|
4210
|
+
|
4211
|
+
/* Document-method: end
|
4212
|
+
* the end of the range
|
4213
|
+
*/
|
4214
|
+
rb_define_method(rb_cFLIP2, "end", node_end, 0);
|
4215
|
+
rb_ary_push(members, rb_str_new2("end"));
|
4216
4216
|
}
|
4217
4217
|
|
4218
4218
|
/* Document-class: Node::FLIP3
|
@@ -4236,17 +4236,17 @@ void define_node_subclass_methods()
|
|
4236
4236
|
rb_define_method(rb_cFLIP3, "cnt", node_cnt, 0);
|
4237
4237
|
rb_ary_push(members, rb_str_new2("cnt"));
|
4238
4238
|
|
4239
|
-
/* Document-method: end
|
4240
|
-
* the end of the range
|
4241
|
-
*/
|
4242
|
-
rb_define_method(rb_cFLIP3, "end", node_end, 0);
|
4243
|
-
rb_ary_push(members, rb_str_new2("end"));
|
4244
|
-
|
4245
4239
|
/* Document-method: beg
|
4246
4240
|
* the beginning of the range
|
4247
4241
|
*/
|
4248
4242
|
rb_define_method(rb_cFLIP3, "beg", node_beg, 0);
|
4249
4243
|
rb_ary_push(members, rb_str_new2("beg"));
|
4244
|
+
|
4245
|
+
/* Document-method: end
|
4246
|
+
* the end of the range
|
4247
|
+
*/
|
4248
|
+
rb_define_method(rb_cFLIP3, "end", node_end, 0);
|
4249
|
+
rb_ary_push(members, rb_str_new2("end"));
|
4250
4250
|
}
|
4251
4251
|
|
4252
4252
|
/* Document-class: Node::FOR
|
@@ -4302,20 +4302,20 @@ void define_node_subclass_methods()
|
|
4302
4302
|
rb_iv_set(rb_cGASGN, "__member__", members);
|
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
|
-
rb_define_method(rb_cGASGN, "entry", node_entry, 0);
|
4306
|
-
rb_ary_push(members, rb_str_new2("entry"));
|
4307
|
-
|
4308
|
-
/* Document-method: vid
|
4309
|
-
* the name of the global variable, with a leading '$' character.
|
4310
|
-
*/
|
4311
|
-
rb_define_method(rb_cGASGN, "vid", node_vid, 0);
|
4312
|
-
rb_ary_push(members, rb_str_new2("vid"));
|
4313
4305
|
|
4314
4306
|
/* Document-method: value
|
4315
4307
|
* an expression whose result is the new value of the global variable
|
4316
4308
|
*/
|
4317
4309
|
rb_define_method(rb_cGASGN, "value", node_value, 0);
|
4318
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
|
+
rb_define_method(rb_cGASGN, "entry", node_entry, 0);
|
4318
|
+
rb_ary_push(members, rb_str_new2("entry"));
|
4319
4319
|
}
|
4320
4320
|
|
4321
4321
|
/* Document-class: Node::GVAR
|
@@ -4328,14 +4328,14 @@ void define_node_subclass_methods()
|
|
4328
4328
|
rb_iv_set(rb_cGVAR, "__member__", members);
|
4329
4329
|
rb_iv_set(rb_cGVAR, "__type__", INT2NUM(NODE_GVAR));
|
4330
4330
|
rb_define_singleton_method(rb_cGVAR, "members", node_s_members, 0);
|
4331
|
-
rb_define_method(rb_cGVAR, "entry", node_entry, 0);
|
4332
|
-
rb_ary_push(members, rb_str_new2("entry"));
|
4333
4331
|
|
4334
4332
|
/* Document-method: vid
|
4335
4333
|
* the name of the global variable to retrieve, with a leading '$'
|
4336
4334
|
*/
|
4337
4335
|
rb_define_method(rb_cGVAR, "vid", node_vid, 0);
|
4338
4336
|
rb_ary_push(members, rb_str_new2("vid"));
|
4337
|
+
rb_define_method(rb_cGVAR, "entry", node_entry, 0);
|
4338
|
+
rb_ary_push(members, rb_str_new2("entry"));
|
4339
4339
|
}
|
4340
4340
|
|
4341
4341
|
/* Document-class: Node::HASH
|
@@ -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,6 +4411,12 @@ 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
|
|
4414
|
+
/* Document-method: cond
|
4415
|
+
* the condition to evaluate
|
4416
|
+
*/
|
4417
|
+
rb_define_method(rb_cIF, "cond", node_cond, 0);
|
4418
|
+
rb_ary_push(members, rb_str_new2("cond"));
|
4419
|
+
|
4413
4420
|
/* Document-method: body
|
4414
4421
|
* the expression to evaluate if the expression is true, or false
|
4415
4422
|
* if the expression is empty
|
@@ -4417,12 +4424,6 @@ void define_node_subclass_methods()
|
|
4417
4424
|
rb_define_method(rb_cIF, "body", node_body, 0);
|
4418
4425
|
rb_ary_push(members, rb_str_new2("body"));
|
4419
4426
|
|
4420
|
-
/* Document-method: cond
|
4421
|
-
* the condition to evaluate
|
4422
|
-
*/
|
4423
|
-
rb_define_method(rb_cIF, "cond", node_cond, 0);
|
4424
|
-
rb_ary_push(members, rb_str_new2("cond"));
|
4425
|
-
|
4426
4427
|
/* Document-method: else
|
4427
4428
|
* the expression to evaluate if the expression is false, or false
|
4428
4429
|
* if the expression is empty
|
@@ -4442,12 +4443,6 @@ void define_node_subclass_methods()
|
|
4442
4443
|
rb_iv_set(rb_cIFUNC, "__type__", INT2NUM(NODE_IFUNC));
|
4443
4444
|
rb_define_singleton_method(rb_cIFUNC, "members", node_s_members, 0);
|
4444
4445
|
|
4445
|
-
/* Document-method: state
|
4446
|
-
* always 0
|
4447
|
-
*/
|
4448
|
-
rb_define_method(rb_cIFUNC, "state", node_state, 0);
|
4449
|
-
rb_ary_push(members, rb_str_new2("state"));
|
4450
|
-
|
4451
4446
|
/* Document-method: cfnc
|
4452
4447
|
* a pointer to the C function to which to yield
|
4453
4448
|
*/
|
@@ -4460,6 +4455,12 @@ void define_node_subclass_methods()
|
|
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
|
@@ -4536,20 +4537,20 @@ void define_node_subclass_methods()
|
|
4536
4537
|
rb_iv_set(rb_cLASGN, "__member__", members);
|
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
|
-
rb_define_method(rb_cLASGN, "cnt", node_cnt, 0);
|
4540
|
-
rb_ary_push(members, rb_str_new2("cnt"));
|
4541
|
-
|
4542
|
-
/* Document-method: vid
|
4543
|
-
* the name of the local variable
|
4544
|
-
*/
|
4545
|
-
rb_define_method(rb_cLASGN, "vid", node_vid, 0);
|
4546
|
-
rb_ary_push(members, rb_str_new2("vid"));
|
4547
4540
|
|
4548
4541
|
/* Document-method: value
|
4549
4542
|
* the value to assign to the local variable
|
4550
4543
|
*/
|
4551
4544
|
rb_define_method(rb_cLASGN, "value", node_value, 0);
|
4552
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"));
|
4552
|
+
rb_define_method(rb_cLASGN, "cnt", node_cnt, 0);
|
4553
|
+
rb_ary_push(members, rb_str_new2("cnt"));
|
4553
4554
|
}
|
4554
4555
|
|
4555
4556
|
/* Document-class: Node::LIT
|
@@ -4581,14 +4582,14 @@ void define_node_subclass_methods()
|
|
4581
4582
|
rb_iv_set(rb_cLVAR, "__member__", members);
|
4582
4583
|
rb_iv_set(rb_cLVAR, "__type__", INT2NUM(NODE_LVAR));
|
4583
4584
|
rb_define_singleton_method(rb_cLVAR, "members", node_s_members, 0);
|
4584
|
-
rb_define_method(rb_cLVAR, "cnt", node_cnt, 0);
|
4585
|
-
rb_ary_push(members, rb_str_new2("cnt"));
|
4586
4585
|
|
4587
4586
|
/* Document-method: vid
|
4588
4587
|
* the name of the local variable to retrieve.
|
4589
4588
|
*/
|
4590
4589
|
rb_define_method(rb_cLVAR, "vid", node_vid, 0);
|
4591
4590
|
rb_ary_push(members, rb_str_new2("vid"));
|
4591
|
+
rb_define_method(rb_cLVAR, "cnt", node_cnt, 0);
|
4592
|
+
rb_ary_push(members, rb_str_new2("cnt"));
|
4592
4593
|
}
|
4593
4594
|
|
4594
4595
|
/* Document-class: Node::MASGN
|
@@ -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,6 +4944,12 @@ 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
|
|
4947
|
+
/* Document-method: args
|
4948
|
+
* the arguments to the assigment
|
4949
|
+
*/
|
4950
|
+
rb_define_method(rb_cOP_ASGN1, "args", node_args, 0);
|
4951
|
+
rb_ary_push(members, rb_str_new2("args"));
|
4952
|
+
|
4946
4953
|
/* Document-method: mid
|
4947
4954
|
* 0, 1, or the name a method to call to calculate the value of the
|
4948
4955
|
* rhs
|
@@ -4955,12 +4962,6 @@ void define_node_subclass_methods()
|
|
4955
4962
|
*/
|
4956
4963
|
rb_define_method(rb_cOP_ASGN1, "recv", node_recv, 0);
|
4957
4964
|
rb_ary_push(members, rb_str_new2("recv"));
|
4958
|
-
|
4959
|
-
/* Document-method: args
|
4960
|
-
* the arguments to the assigment
|
4961
|
-
*/
|
4962
|
-
rb_define_method(rb_cOP_ASGN1, "args", node_args, 0);
|
4963
|
-
rb_ary_push(members, rb_str_new2("args"));
|
4964
4965
|
}
|
4965
4966
|
|
4966
4967
|
/* Document-class: Node::OP_ASGN2
|
@@ -5016,6 +5017,12 @@ void define_node_subclass_methods()
|
|
5016
5017
|
rb_iv_set(rb_cOP_ASGN2_ARG, "__type__", INT2NUM(NODE_OP_ASGN2_ARG));
|
5017
5018
|
rb_define_singleton_method(rb_cOP_ASGN2_ARG, "members", node_s_members, 0);
|
5018
5019
|
|
5020
|
+
/* Document-method: vid
|
5021
|
+
* The method to call on the receiver to retrieve the attribute
|
5022
|
+
*/
|
5023
|
+
rb_define_method(rb_cOP_ASGN2_ARG, "vid", node_vid, 0);
|
5024
|
+
rb_ary_push(members, rb_str_new2("vid"));
|
5025
|
+
|
5019
5026
|
/* Document-method: aid
|
5020
5027
|
* The method to call on the receiver to set the attribute
|
5021
5028
|
*/
|
@@ -5029,12 +5036,6 @@ void define_node_subclass_methods()
|
|
5029
5036
|
*/
|
5030
5037
|
rb_define_method(rb_cOP_ASGN2_ARG, "mid", node_mid, 0);
|
5031
5038
|
rb_ary_push(members, rb_str_new2("mid"));
|
5032
|
-
|
5033
|
-
/* Document-method: vid
|
5034
|
-
* The method to call on the receiver to retrieve the attribute
|
5035
|
-
*/
|
5036
|
-
rb_define_method(rb_cOP_ASGN2_ARG, "vid", node_vid, 0);
|
5037
|
-
rb_ary_push(members, rb_str_new2("vid"));
|
5038
5039
|
}
|
5039
5040
|
|
5040
5041
|
/* Document-class: Node::OP_ASGN_AND
|
@@ -5091,17 +5092,17 @@ void define_node_subclass_methods()
|
|
5091
5092
|
rb_define_method(rb_cOP_ASGN_OR, "aid", node_aid, 0);
|
5092
5093
|
rb_ary_push(members, rb_str_new2("aid"));
|
5093
5094
|
|
5094
|
-
/* Document-method: recv
|
5095
|
-
* the receiver of the assignment
|
5096
|
-
*/
|
5097
|
-
rb_define_method(rb_cOP_ASGN_OR, "recv", node_recv, 0);
|
5098
|
-
rb_ary_push(members, rb_str_new2("recv"));
|
5099
|
-
|
5100
5095
|
/* Document-method: value
|
5101
5096
|
* the right hand side of the assignment
|
5102
5097
|
*/
|
5103
5098
|
rb_define_method(rb_cOP_ASGN_OR, "value", node_value, 0);
|
5104
5099
|
rb_ary_push(members, rb_str_new2("value"));
|
5100
|
+
|
5101
|
+
/* Document-method: recv
|
5102
|
+
* the receiver of the assignment
|
5103
|
+
*/
|
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
|
@@ -5119,17 +5120,17 @@ void define_node_subclass_methods()
|
|
5119
5120
|
rb_iv_set(rb_cOR, "__type__", INT2NUM(NODE_OR));
|
5120
5121
|
rb_define_singleton_method(rb_cOR, "members", node_s_members, 0);
|
5121
5122
|
|
5122
|
-
/* Document-method: first
|
5123
|
-
* the expression on the left hand side
|
5124
|
-
*/
|
5125
|
-
rb_define_method(rb_cOR, "first", node_1st, 0);
|
5126
|
-
rb_ary_push(members, rb_str_new2("first"));
|
5127
|
-
|
5128
5123
|
/* Document-method: second
|
5129
5124
|
* the expression on the right hand side
|
5130
5125
|
*/
|
5131
5126
|
rb_define_method(rb_cOR, "second", node_2nd, 0);
|
5132
5127
|
rb_ary_push(members, rb_str_new2("second"));
|
5128
|
+
|
5129
|
+
/* Document-method: first
|
5130
|
+
* the expression on the left hand side
|
5131
|
+
*/
|
5132
|
+
rb_define_method(rb_cOR, "first", node_1st, 0);
|
5133
|
+
rb_ary_push(members, rb_str_new2("first"));
|
5133
5134
|
}
|
5134
5135
|
|
5135
5136
|
/* Document-class: Node::POSTEXE
|
@@ -5181,18 +5182,18 @@ void define_node_subclass_methods()
|
|
5181
5182
|
rb_iv_set(rb_cRESBODY, "__type__", INT2NUM(NODE_RESBODY));
|
5182
5183
|
rb_define_singleton_method(rb_cRESBODY, "members", node_s_members, 0);
|
5183
5184
|
|
5184
|
-
/* Document-method: body
|
5185
|
-
* the expresion to evaluate if the exception type matches
|
5186
|
-
*/
|
5187
|
-
rb_define_method(rb_cRESBODY, "body", node_body, 0);
|
5188
|
-
rb_ary_push(members, rb_str_new2("body"));
|
5189
|
-
|
5190
5185
|
/* Document-method: head
|
5191
5186
|
* the next rescue
|
5192
5187
|
*/
|
5193
5188
|
rb_define_method(rb_cRESBODY, "head", node_head, 0);
|
5194
5189
|
rb_ary_push(members, rb_str_new2("head"));
|
5195
5190
|
|
5191
|
+
/* Document-method: body
|
5192
|
+
* the expresion to evaluate if the exception type matches
|
5193
|
+
*/
|
5194
|
+
rb_define_method(rb_cRESBODY, "body", node_body, 0);
|
5195
|
+
rb_ary_push(members, rb_str_new2("body"));
|
5196
|
+
|
5196
5197
|
/* Document-method: args
|
5197
5198
|
* the expression type to match against
|
5198
5199
|
*/
|
@@ -5237,18 +5238,18 @@ 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: resq
|
5241
|
-
* the expression to be evaluated if an exception is raised
|
5242
|
-
*/
|
5243
|
-
rb_define_method(rb_cRESCUE, "resq", node_resq, 0);
|
5244
|
-
rb_ary_push(members, rb_str_new2("resq"));
|
5245
|
-
|
5246
5241
|
/* Document-method: head
|
5247
5242
|
* the body of the block to evaluate
|
5248
5243
|
*/
|
5249
5244
|
rb_define_method(rb_cRESCUE, "head", node_head, 0);
|
5250
5245
|
rb_ary_push(members, rb_str_new2("head"));
|
5251
5246
|
|
5247
|
+
/* Document-method: resq
|
5248
|
+
* the expression to be evaluated if an exception is raised
|
5249
|
+
*/
|
5250
|
+
rb_define_method(rb_cRESCUE, "resq", node_resq, 0);
|
5251
|
+
rb_ary_push(members, rb_str_new2("resq"));
|
5252
|
+
|
5252
5253
|
/* Document-method: else
|
5253
5254
|
* the expression to be evaluated if no exception is raised
|
5254
5255
|
*/
|
@@ -5534,14 +5535,14 @@ void define_node_subclass_methods()
|
|
5534
5535
|
*/
|
5535
5536
|
rb_define_method(rb_cUNTIL, "body", node_body, 0);
|
5536
5537
|
rb_ary_push(members, rb_str_new2("body"));
|
5537
|
-
rb_define_method(rb_cUNTIL, "state", node_state, 0);
|
5538
|
-
rb_ary_push(members, rb_str_new2("state"));
|
5539
5538
|
|
5540
5539
|
/* Document-method: cond
|
5541
5540
|
* a condition to terminate the loop when it becomes true
|
5542
5541
|
*/
|
5543
5542
|
rb_define_method(rb_cUNTIL, "cond", node_cond, 0);
|
5544
5543
|
rb_ary_push(members, rb_str_new2("cond"));
|
5544
|
+
rb_define_method(rb_cUNTIL, "state", node_state, 0);
|
5545
|
+
rb_ary_push(members, rb_str_new2("state"));
|
5545
5546
|
}
|
5546
5547
|
|
5547
5548
|
/* Document-class: Node::VALIAS
|
@@ -5620,6 +5621,12 @@ void define_node_subclass_methods()
|
|
5620
5621
|
rb_iv_set(rb_cWHEN, "__type__", INT2NUM(NODE_WHEN));
|
5621
5622
|
rb_define_singleton_method(rb_cWHEN, "members", node_s_members, 0);
|
5622
5623
|
|
5624
|
+
/* Document-method: head
|
5625
|
+
* a value to compare against, or a condition to be tested
|
5626
|
+
*/
|
5627
|
+
rb_define_method(rb_cWHEN, "head", node_head, 0);
|
5628
|
+
rb_ary_push(members, rb_str_new2("head"));
|
5629
|
+
|
5623
5630
|
/* Document-method: body
|
5624
5631
|
* an expression to evaluate if the condition evaluates to true
|
5625
5632
|
*/
|
@@ -5631,12 +5638,6 @@ void define_node_subclass_methods()
|
|
5631
5638
|
*/
|
5632
5639
|
rb_define_method(rb_cWHEN, "next", node_next, 0);
|
5633
5640
|
rb_ary_push(members, rb_str_new2("next"));
|
5634
|
-
|
5635
|
-
/* Document-method: head
|
5636
|
-
* a value to compare against, or a condition to be tested
|
5637
|
-
*/
|
5638
|
-
rb_define_method(rb_cWHEN, "head", node_head, 0);
|
5639
|
-
rb_ary_push(members, rb_str_new2("head"));
|
5640
5641
|
}
|
5641
5642
|
|
5642
5643
|
/* Document-class: Node::WHILE
|
@@ -5658,14 +5659,14 @@ void define_node_subclass_methods()
|
|
5658
5659
|
*/
|
5659
5660
|
rb_define_method(rb_cWHILE, "body", node_body, 0);
|
5660
5661
|
rb_ary_push(members, rb_str_new2("body"));
|
5661
|
-
rb_define_method(rb_cWHILE, "state", node_state, 0);
|
5662
|
-
rb_ary_push(members, rb_str_new2("state"));
|
5663
5662
|
|
5664
5663
|
/* Document-method: cond
|
5665
5664
|
* a condition to terminate the loop when it becomes false
|
5666
5665
|
*/
|
5667
5666
|
rb_define_method(rb_cWHILE, "cond", node_cond, 0);
|
5668
5667
|
rb_ary_push(members, rb_str_new2("cond"));
|
5668
|
+
rb_define_method(rb_cWHILE, "state", node_state, 0);
|
5669
|
+
rb_ary_push(members, rb_str_new2("state"));
|
5669
5670
|
}
|
5670
5671
|
|
5671
5672
|
/* Document-class: Node::XSTR
|
@@ -5702,17 +5703,17 @@ void define_node_subclass_methods()
|
|
5702
5703
|
rb_iv_set(rb_cYIELD, "__type__", INT2NUM(NODE_YIELD));
|
5703
5704
|
rb_define_singleton_method(rb_cYIELD, "members", node_s_members, 0);
|
5704
5705
|
|
5705
|
-
/* Document-method: state
|
5706
|
-
* if nonzero, splats the value before yielding
|
5707
|
-
*/
|
5708
|
-
rb_define_method(rb_cYIELD, "state", node_state, 0);
|
5709
|
-
rb_ary_push(members, rb_str_new2("state"));
|
5710
|
-
|
5711
5706
|
/* Document-method: head
|
5712
5707
|
* the value to yield
|
5713
5708
|
*/
|
5714
5709
|
rb_define_method(rb_cYIELD, "head", node_head, 0);
|
5715
5710
|
rb_ary_push(members, rb_str_new2("head"));
|
5711
|
+
|
5712
|
+
/* Document-method: state
|
5713
|
+
* if nonzero, splats the value before yielding
|
5714
|
+
*/
|
5715
|
+
rb_define_method(rb_cYIELD, "state", node_state, 0);
|
5716
|
+
rb_ary_push(members, rb_str_new2("state"));
|
5716
5717
|
}
|
5717
5718
|
|
5718
5719
|
/* Document-class: Node::ZARRAY
|