Make interchangeable NODE types aliases

This commit is contained in:
Nobuyoshi Nakada 2024-05-27 18:20:04 +09:00
Родитель a7d0a91009
Коммит cedc7737b6
4 изменённых файлов: 231 добавлений и 262 удалений

Просмотреть файл

@ -4429,11 +4429,12 @@ static int
compile_dregx(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, int popped)
{
int cnt;
int cflag = (int)RNODE_DREGX(node)->as.nd_cflag;
if (!RNODE_DREGX(node)->nd_next) {
if (!popped) {
VALUE src = rb_node_dregx_string_val(node);
VALUE match = rb_reg_compile(src, (int)RNODE_DREGX(node)->nd_cflag, NULL, 0);
VALUE match = rb_reg_compile(src, cflag, NULL, 0);
ADD_INSN1(ret, node, putobject, match);
RB_OBJ_WRITTEN(iseq, Qundef, match);
}
@ -4441,7 +4442,7 @@ compile_dregx(rb_iseq_t *iseq, LINK_ANCHOR *const ret, const NODE *const node, i
}
CHECK(compile_dstr_fragments(iseq, ret, node, &cnt));
ADD_INSN2(ret, node, toregexp, INT2FIX(RNODE_DREGX(node)->nd_cflag), INT2FIX(cnt));
ADD_INSN2(ret, node, toregexp, INT2FIX(cflag), INT2FIX(cnt));
if (popped) {
ADD_INSN(ret, node, pop);

Просмотреть файл

@ -301,213 +301,213 @@ class RbInspector(LLDBInterface):
self._append_expression("(node_type) %d" % nd_type)
if nd_type == self.ruby_globals["NODE_SCOPE"]:
self._append_expression("*(struct RNode_SCOPE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_scope_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_BLOCK"]:
self._append_expression("*(struct RNode_BLOCK *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_block_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_IF"]:
self._append_expression("*(struct RNode_IF *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_if_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_UNLESS"]:
self._append_expression("*(struct RNode_UNLESS *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_unless_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CASE"]:
self._append_expression("*(struct RNode_CASE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_case_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CASE2"]:
self._append_expression("*(struct RNode_CASE2 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_case2_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CASE3"]:
self._append_expression("*(struct RNode_CASE3 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_case3_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_WHEN"]:
self._append_expression("*(struct RNode_WHEN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_when_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_IN"]:
self._append_expression("*(struct RNode_IN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_in_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_WHILE"]:
self._append_expression("*(struct RNode_WHILE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_while_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_UNTIL"]:
self._append_expression("*(struct RNode_UNTIL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_until_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ITER"]:
self._append_expression("*(struct RNode_ITER *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_iter_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FOR"]:
self._append_expression("*(struct RNode_FOR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_for_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FOR_MASGN"]:
self._append_expression("*(struct RNode_FOR_MASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_for_masgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_BREAK"]:
self._append_expression("*(struct RNode_BREAK *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_break_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_NEXT"]:
self._append_expression("*(struct RNode_NEXT *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_next_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_REDO"]:
self._append_expression("*(struct RNode_REDO *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_redo_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_RETRY"]:
self._append_expression("*(struct RNode_RETRY *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_retry_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_BEGIN"]:
self._append_expression("*(struct RNode_BEGIN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_begin_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_RESCUE"]:
self._append_expression("*(struct RNode_RESCUE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_rescue_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_RESBODY"]:
self._append_expression("*(struct RNode_RESBODY *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_resbody_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ENSURE"]:
self._append_expression("*(struct RNode_ENSURE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_ensure_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_AND"]:
self._append_expression("*(struct RNode_AND *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_and_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OR"]:
self._append_expression("*(struct RNode_OR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_or_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_MASGN"]:
self._append_expression("*(struct RNode_MASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_masgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_LASGN"]:
self._append_expression("*(struct RNode_LASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_lasgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DASGN"]:
self._append_expression("*(struct RNode_DASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dasgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_GASGN"]:
self._append_expression("*(struct RNode_GASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_gasgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_IASGN"]:
self._append_expression("*(struct RNode_IASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_iasgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CDECL"]:
self._append_expression("*(struct RNode_CDECL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_cdecl_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CVASGN"]:
self._append_expression("*(struct RNode_CVASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_cvasgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OP_ASGN1"]:
self._append_expression("*(struct RNode_OP_ASGN1 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_op_asgn1_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OP_ASGN2"]:
self._append_expression("*(struct RNode_OP_ASGN2 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_op_asgn2_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OP_ASGN_AND"]:
self._append_expression("*(struct RNode_OP_ASGN_AND *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_op_asgn_and_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OP_ASGN_OR"]:
self._append_expression("*(struct RNode_OP_ASGN_OR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_op_asgn_or_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OP_CDECL"]:
self._append_expression("*(struct RNode_OP_CDECL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_op_cdecl_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CALL"]:
self._append_expression("*(struct RNode_CALL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_call_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OPCALL"]:
self._append_expression("*(struct RNode_OPCALL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_opcall_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FCALL"]:
self._append_expression("*(struct RNode_FCALL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_fcall_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_VCALL"]:
self._append_expression("*(struct RNode_VCALL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_vcall_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_QCALL"]:
self._append_expression("*(struct RNode_QCALL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_qcall_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_SUPER"]:
self._append_expression("*(struct RNode_SUPER *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_super_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ZSUPER"]:
self._append_expression("*(struct RNode_ZSUPER *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_zsuper_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_LIST"]:
self._append_expression("*(struct RNode_LIST *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_list_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ZLIST"]:
self._append_expression("*(struct RNode_ZLIST *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_zlist_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_HASH"]:
self._append_expression("*(struct RNode_HASH *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_hash_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_RETURN"]:
self._append_expression("*(struct RNode_RETURN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_return_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_YIELD"]:
self._append_expression("*(struct RNode_YIELD *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_yield_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_LVAR"]:
self._append_expression("*(struct RNode_LVAR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_lvar_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DVAR"]:
self._append_expression("*(struct RNode_DVAR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dvar_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_GVAR"]:
self._append_expression("*(struct RNode_GVAR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_gvar_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CONST"]:
self._append_expression("*(struct RNode_CONST *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_const_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CVAR"]:
self._append_expression("*(struct RNode_CVAR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_cvar_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_NTH_REF"]:
self._append_expression("*(struct RNode_NTH_REF *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_nth_ref_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_BACK_REF"]:
self._append_expression("*(struct RNode_BACK_REF *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_back_ref_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_MATCH"]:
self._append_expression("*(struct RNode_MATCH *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_match_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_MATCH2"]:
self._append_expression("*(struct RNode_MATCH2 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_match2_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_MATCH3"]:
self._append_expression("*(struct RNode_MATCH3 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_match3_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_STR"]:
self._append_expression("*(struct RNode_STR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_str_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DSTR"]:
self._append_expression("*(struct RNode_DSTR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dstr_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_XSTR"]:
self._append_expression("*(struct RNode_XSTR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_xstr_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DXSTR"]:
self._append_expression("*(struct RNode_DXSTR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dxstr_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_EVSTR"]:
self._append_expression("*(struct RNode_EVSTR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_evstr_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_REGX"]:
self._append_expression("*(struct RNode_REGX *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_regx_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DREGX"]:
self._append_expression("*(struct RNode_DREGX *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dregx_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ONCE"]:
self._append_expression("*(struct RNode_ONCE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_once_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ARGS"]:
self._append_expression("*(struct RNode_ARGS *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_args_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ARGS_AUX"]:
self._append_expression("*(struct RNode_ARGS_AUX *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_args_aux_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_OPT_ARG"]:
self._append_expression("*(struct RNode_OPT_ARG *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_opt_arg_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_KW_ARG"]:
self._append_expression("*(struct RNode_KW_ARG *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_kw_arg_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_POSTARG"]:
self._append_expression("*(struct RNode_POSTARG *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_postarg_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ARGSCAT"]:
self._append_expression("*(struct RNode_ARGSCAT *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_argscat_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ARGSPUSH"]:
self._append_expression("*(struct RNode_ARGSPUSH *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_argspush_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_SPLAT"]:
self._append_expression("*(struct RNode_SPLAT *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_splat_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DEFN"]:
self._append_expression("*(struct RNode_DEFN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_defn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DEFS"]:
self._append_expression("*(struct RNode_DEFS *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_defs_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ALIAS"]:
self._append_expression("*(struct RNode_ALIAS *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_alias_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_VALIAS"]:
self._append_expression("*(struct RNode_VALIAS *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_valias_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_UNDEF"]:
self._append_expression("*(struct RNode_UNDEF *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_undef_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_CLASS"]:
self._append_expression("*(struct RNode_CLASS *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_class_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_MODULE"]:
self._append_expression("*(struct RNode_MODULE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_module_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_SCLASS"]:
self._append_expression("*(struct RNode_SCLASS *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_sclass_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_COLON2"]:
self._append_expression("*(struct RNode_COLON2 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_colon2_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_COLON3"]:
self._append_expression("*(struct RNode_COLON3 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_colon3_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DOT2"]:
self._append_expression("*(struct RNode_DOT2 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dot2_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DOT3"]:
self._append_expression("*(struct RNode_DOT3 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dot3_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FLIP2"]:
self._append_expression("*(struct RNode_FLIP2 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_flip2_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FLIP3"]:
self._append_expression("*(struct RNode_FLIP3 *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_flip3_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_SELF"]:
self._append_expression("*(struct RNode_SELF *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_self_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_NIL"]:
self._append_expression("*(struct RNode_NIL *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_nil_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_TRUE"]:
self._append_expression("*(struct RNode_TRUE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_true_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FALSE"]:
self._append_expression("*(struct RNode_FALSE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_false_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ERRINFO"]:
self._append_expression("*(struct RNode_ERRINFO *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_errinfo_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DEFINED"]:
self._append_expression("*(struct RNode_DEFINED *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_defined_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_POSTEXE"]:
self._append_expression("*(struct RNode_POSTEXE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_postexe_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_DSYM"]:
self._append_expression("*(struct RNode_DSYM *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_dsym_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ATTRASGN"]:
self._append_expression("*(struct RNode_ATTRASGN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_attrasgn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_LAMBDA"]:
self._append_expression("*(struct RNode_LAMBDA *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_lambda_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ARYPTN"]:
self._append_expression("*(struct RNode_ARYPTN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_aryptn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_HSHPTN"]:
self._append_expression("*(struct RNode_HSHPTN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_hshptn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FNDPTN"]:
self._append_expression("*(struct RNode_FNDPTN *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_fndptn_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_ERROR"]:
self._append_expression("*(struct RNode_ERROR *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_error_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_LINE"]:
self._append_expression("*(struct RNode_LINE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_line_t *) %0#x" % val.GetValueAsUnsigned())
elif nd_type == self.ruby_globals["NODE_FILE"]:
self._append_expression("*(struct RNode_FILE *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(rb_node_file_t *) %0#x" % val.GetValueAsUnsigned())
else:
self._append_expression("*(struct RNode *) %0#x" % val.GetValueAsUnsigned())
self._append_expression("*(NODE *) %0#x" % val.GetValueAsUnsigned())
return True

Просмотреть файл

@ -12113,7 +12113,7 @@ rb_node_dxstr_new(struct parser_params *p, rb_parser_string_t *string, long nd_a
{
rb_node_dxstr_t *n = NODE_NEWNODE(NODE_DXSTR, rb_node_dxstr_t, loc);
n->string = string;
n->nd_alen = nd_alen;
n->as.nd_alen = nd_alen;
n->nd_next = (rb_node_list_t *)nd_next;
return n;
@ -12133,7 +12133,7 @@ rb_node_dsym_new(struct parser_params *p, rb_parser_string_t *string, long nd_al
{
rb_node_dsym_t *n = NODE_NEWNODE(NODE_DSYM, rb_node_dsym_t, loc);
n->string = string;
n->nd_alen = nd_alen;
n->as.nd_alen = nd_alen;
n->nd_next = (rb_node_list_t *)nd_next;
return n;
@ -13192,7 +13192,7 @@ new_regexp(struct parser_params *p, NODE *node, int options, const YYLTYPE *loc)
case NODE_DSTR:
nd_set_type(node, NODE_DREGX);
nd_set_loc(node, loc);
RNODE_DREGX(node)->nd_cflag = options & RE_OPTION_MASK;
RNODE_DREGX(node)->as.nd_cflag = options & RE_OPTION_MASK;
if (RNODE_DREGX(node)->string) reg_fragment_check(p, RNODE_DREGX(node)->string, options);
for (list = RNODE_DREGX(prev = node)->nd_next; list; list = RNODE_LIST(list->nd_next)) {
NODE *frag = list->nd_head;

Просмотреть файл

@ -731,31 +731,22 @@ typedef struct RNode_STR {
struct rb_parser_string *string;
} rb_node_str_t;
/* RNode_DSTR, RNode_DXSTR and RNode_DSYM should be same structure */
/* RNode_DSTR, RNode_DXSTR, RNode_DREGX and RNode_DSYM should be same structure */
typedef struct RNode_DSTR {
NODE node;
struct rb_parser_string *string;
union {
long nd_alen;
long nd_cflag;
struct RNode *nd_end; /* Second dstr node has this structure. See also RNode_LIST */
} as;
struct RNode_LIST *nd_next;
} rb_node_dstr_t;
typedef struct RNode_XSTR {
NODE node;
typedef rb_node_str_t rb_node_xstr_t;
struct rb_parser_string *string;
} rb_node_xstr_t;
typedef struct RNode_DXSTR {
NODE node;
struct rb_parser_string *string;
long nd_alen;
struct RNode_LIST *nd_next;
} rb_node_dxstr_t;
typedef rb_node_dstr_t rb_node_dxstr_t;
typedef struct RNode_EVSTR {
NODE node;
@ -770,13 +761,7 @@ typedef struct RNode_REGX {
int options;
} rb_node_regx_t;
typedef struct RNode_DREGX {
NODE node;
struct rb_parser_string *string;
ID nd_cflag;
struct RNode_LIST *nd_next;
} rb_node_dregx_t;
typedef rb_node_dstr_t rb_node_dregx_t;
typedef struct RNode_ONCE {
NODE node;
@ -952,19 +937,8 @@ typedef struct RNode_DOT3 {
struct RNode *nd_end;
} rb_node_dot3_t;
typedef struct RNode_FLIP2 {
NODE node;
struct RNode *nd_beg;
struct RNode *nd_end;
} rb_node_flip2_t;
typedef struct RNode_FLIP3 {
NODE node;
struct RNode *nd_beg;
struct RNode *nd_end;
} rb_node_flip3_t;
typedef rb_node_dot2_t rb_node_flip2_t;
typedef rb_node_dot3_t rb_node_flip3_t;
typedef struct RNode_SELF {
NODE node;
@ -1006,13 +980,7 @@ typedef struct RNode_SYM {
struct rb_parser_string *string;
} rb_node_sym_t;
typedef struct RNode_DSYM {
NODE node;
struct rb_parser_string *string;
long nd_alen;
struct RNode_LIST *nd_next;
} rb_node_dsym_t;
typedef rb_node_dstr_t rb_node_dsym_t;
typedef struct RNode_ATTRASGN {
NODE node;
@ -1073,119 +1041,119 @@ typedef struct RNode_ERROR {
NODE node;
} rb_node_error_t;
#define RNODE(obj) ((struct RNode *)(obj))
#define RNODE(obj) ((NODE *)(obj))
#define RNODE_SCOPE(node) ((struct RNode_SCOPE *)(node))
#define RNODE_BLOCK(node) ((struct RNode_BLOCK *)(node))
#define RNODE_IF(node) ((struct RNode_IF *)(node))
#define RNODE_UNLESS(node) ((struct RNode_UNLESS *)(node))
#define RNODE_CASE(node) ((struct RNode_CASE *)(node))
#define RNODE_CASE2(node) ((struct RNode_CASE2 *)(node))
#define RNODE_CASE3(node) ((struct RNode_CASE3 *)(node))
#define RNODE_WHEN(node) ((struct RNode_WHEN *)(node))
#define RNODE_IN(node) ((struct RNode_IN *)(node))
#define RNODE_WHILE(node) ((struct RNode_WHILE *)(node))
#define RNODE_UNTIL(node) ((struct RNode_UNTIL *)(node))
#define RNODE_ITER(node) ((struct RNode_ITER *)(node))
#define RNODE_FOR(node) ((struct RNode_FOR *)(node))
#define RNODE_FOR_MASGN(node) ((struct RNode_FOR_MASGN *)(node))
#define RNODE_BREAK(node) ((struct RNode_BREAK *)(node))
#define RNODE_NEXT(node) ((struct RNode_NEXT *)(node))
#define RNODE_REDO(node) ((struct RNode_REDO *)(node))
#define RNODE_RETRY(node) ((struct RNode_RETRY *)(node))
#define RNODE_BEGIN(node) ((struct RNode_BEGIN *)(node))
#define RNODE_RESCUE(node) ((struct RNode_RESCUE *)(node))
#define RNODE_RESBODY(node) ((struct RNode_RESBODY *)(node))
#define RNODE_ENSURE(node) ((struct RNode_ENSURE *)(node))
#define RNODE_AND(node) ((struct RNode_AND *)(node))
#define RNODE_OR(node) ((struct RNode_OR *)(node))
#define RNODE_MASGN(node) ((struct RNode_MASGN *)(node))
#define RNODE_LASGN(node) ((struct RNode_LASGN *)(node))
#define RNODE_DASGN(node) ((struct RNode_DASGN *)(node))
#define RNODE_GASGN(node) ((struct RNode_GASGN *)(node))
#define RNODE_IASGN(node) ((struct RNode_IASGN *)(node))
#define RNODE_CDECL(node) ((struct RNode_CDECL *)(node))
#define RNODE_CVASGN(node) ((struct RNode_CVASGN *)(node))
#define RNODE_OP_ASGN1(node) ((struct RNode_OP_ASGN1 *)(node))
#define RNODE_OP_ASGN2(node) ((struct RNode_OP_ASGN2 *)(node))
#define RNODE_OP_ASGN_AND(node) ((struct RNode_OP_ASGN_AND *)(node))
#define RNODE_OP_ASGN_OR(node) ((struct RNode_OP_ASGN_OR *)(node))
#define RNODE_OP_CDECL(node) ((struct RNode_OP_CDECL *)(node))
#define RNODE_CALL(node) ((struct RNode_CALL *)(node))
#define RNODE_OPCALL(node) ((struct RNode_OPCALL *)(node))
#define RNODE_FCALL(node) ((struct RNode_FCALL *)(node))
#define RNODE_VCALL(node) ((struct RNode_VCALL *)(node))
#define RNODE_QCALL(node) ((struct RNode_QCALL *)(node))
#define RNODE_SUPER(node) ((struct RNode_SUPER *)(node))
#define RNODE_ZSUPER(node) ((struct RNode_ZSUPER *)(node))
#define RNODE_LIST(node) ((struct RNode_LIST *)(node))
#define RNODE_ZLIST(node) ((struct RNode_ZLIST *)(node))
#define RNODE_HASH(node) ((struct RNode_HASH *)(node))
#define RNODE_RETURN(node) ((struct RNode_RETURN *)(node))
#define RNODE_YIELD(node) ((struct RNode_YIELD *)(node))
#define RNODE_LVAR(node) ((struct RNode_LVAR *)(node))
#define RNODE_DVAR(node) ((struct RNode_DVAR *)(node))
#define RNODE_GVAR(node) ((struct RNode_GVAR *)(node))
#define RNODE_IVAR(node) ((struct RNode_IVAR *)(node))
#define RNODE_CONST(node) ((struct RNode_CONST *)(node))
#define RNODE_CVAR(node) ((struct RNode_CVAR *)(node))
#define RNODE_NTH_REF(node) ((struct RNode_NTH_REF *)(node))
#define RNODE_BACK_REF(node) ((struct RNode_BACK_REF *)(node))
#define RNODE_MATCH(node) ((struct RNode_MATCH *)(node))
#define RNODE_MATCH2(node) ((struct RNode_MATCH2 *)(node))
#define RNODE_MATCH3(node) ((struct RNode_MATCH3 *)(node))
#define RNODE_INTEGER(node) ((struct RNode_INTEGER *)(node))
#define RNODE_FLOAT(node) ((struct RNode_FLOAT *)(node))
#define RNODE_RATIONAL(node) ((struct RNode_RATIONAL *)(node))
#define RNODE_IMAGINARY(node) ((struct RNode_IMAGINARY *)(node))
#define RNODE_STR(node) ((struct RNode_STR *)(node))
#define RNODE_DSTR(node) ((struct RNode_DSTR *)(node))
#define RNODE_XSTR(node) ((struct RNode_XSTR *)(node))
#define RNODE_DXSTR(node) ((struct RNode_DXSTR *)(node))
#define RNODE_EVSTR(node) ((struct RNode_EVSTR *)(node))
#define RNODE_REGX(node) ((struct RNode_REGX *)(node))
#define RNODE_DREGX(node) ((struct RNode_DREGX *)(node))
#define RNODE_ONCE(node) ((struct RNode_ONCE *)(node))
#define RNODE_ARGS(node) ((struct RNode_ARGS *)(node))
#define RNODE_ARGS_AUX(node) ((struct RNode_ARGS_AUX *)(node))
#define RNODE_OPT_ARG(node) ((struct RNode_OPT_ARG *)(node))
#define RNODE_KW_ARG(node) ((struct RNode_KW_ARG *)(node))
#define RNODE_POSTARG(node) ((struct RNode_POSTARG *)(node))
#define RNODE_ARGSCAT(node) ((struct RNode_ARGSCAT *)(node))
#define RNODE_ARGSPUSH(node) ((struct RNode_ARGSPUSH *)(node))
#define RNODE_SPLAT(node) ((struct RNode_SPLAT *)(node))
#define RNODE_BLOCK_PASS(node) ((struct RNode_BLOCK_PASS *)(node))
#define RNODE_DEFN(node) ((struct RNode_DEFN *)(node))
#define RNODE_DEFS(node) ((struct RNode_DEFS *)(node))
#define RNODE_ALIAS(node) ((struct RNode_ALIAS *)(node))
#define RNODE_VALIAS(node) ((struct RNode_VALIAS *)(node))
#define RNODE_UNDEF(node) ((struct RNode_UNDEF *)(node))
#define RNODE_CLASS(node) ((struct RNode_CLASS *)(node))
#define RNODE_MODULE(node) ((struct RNode_MODULE *)(node))
#define RNODE_SCLASS(node) ((struct RNode_SCLASS *)(node))
#define RNODE_COLON2(node) ((struct RNode_COLON2 *)(node))
#define RNODE_COLON3(node) ((struct RNode_COLON3 *)(node))
#define RNODE_DOT2(node) ((struct RNode_DOT2 *)(node))
#define RNODE_DOT3(node) ((struct RNode_DOT3 *)(node))
#define RNODE_FLIP2(node) ((struct RNode_FLIP2 *)(node))
#define RNODE_FLIP3(node) ((struct RNode_FLIP3 *)(node))
#define RNODE_SELF(node) ((struct RNode_SELF *)(node))
#define RNODE_NIL(node) ((struct RNode_NIL *)(node))
#define RNODE_TRUE(node) ((struct RNode_TRUE *)(node))
#define RNODE_FALSE(node) ((struct RNode_FALSE *)(node))
#define RNODE_ERRINFO(node) ((struct RNode_ERRINFO *)(node))
#define RNODE_DEFINED(node) ((struct RNode_DEFINED *)(node))
#define RNODE_POSTEXE(node) ((struct RNode_POSTEXE *)(node))
#define RNODE_SYM(node) ((struct RNode_SYM *)(node))
#define RNODE_DSYM(node) ((struct RNode_DSYM *)(node))
#define RNODE_ATTRASGN(node) ((struct RNode_ATTRASGN *)(node))
#define RNODE_LAMBDA(node) ((struct RNode_LAMBDA *)(node))
#define RNODE_ARYPTN(node) ((struct RNode_ARYPTN *)(node))
#define RNODE_HSHPTN(node) ((struct RNode_HSHPTN *)(node))
#define RNODE_FNDPTN(node) ((struct RNode_FNDPTN *)(node))
#define RNODE_LINE(node) ((struct RNode_LINE *)(node))
#define RNODE_FILE(node) ((struct RNode_FILE *)(node))
#define RNODE_ENCODING(node) ((struct RNode_ENCODING *)(node))
#define RNODE_SCOPE(node) ((rb_node_scope_t *)(node))
#define RNODE_BLOCK(node) ((rb_node_block_t *)(node))
#define RNODE_IF(node) ((rb_node_if_t *)(node))
#define RNODE_UNLESS(node) ((rb_node_unless_t *)(node))
#define RNODE_CASE(node) ((rb_node_case_t *)(node))
#define RNODE_CASE2(node) ((rb_node_case2_t *)(node))
#define RNODE_CASE3(node) ((rb_node_case3_t *)(node))
#define RNODE_WHEN(node) ((rb_node_when_t *)(node))
#define RNODE_IN(node) ((rb_node_in_t *)(node))
#define RNODE_WHILE(node) ((rb_node_while_t *)(node))
#define RNODE_UNTIL(node) ((rb_node_until_t *)(node))
#define RNODE_ITER(node) ((rb_node_iter_t *)(node))
#define RNODE_FOR(node) ((rb_node_for_t *)(node))
#define RNODE_FOR_MASGN(node) ((rb_node_for_masgn_t *)(node))
#define RNODE_BREAK(node) ((rb_node_break_t *)(node))
#define RNODE_NEXT(node) ((rb_node_next_t *)(node))
#define RNODE_REDO(node) ((rb_node_redo_t *)(node))
#define RNODE_RETRY(node) ((rb_node_retry_t *)(node))
#define RNODE_BEGIN(node) ((rb_node_begin_t *)(node))
#define RNODE_RESCUE(node) ((rb_node_rescue_t *)(node))
#define RNODE_RESBODY(node) ((rb_node_resbody_t *)(node))
#define RNODE_ENSURE(node) ((rb_node_ensure_t *)(node))
#define RNODE_AND(node) ((rb_node_and_t *)(node))
#define RNODE_OR(node) ((rb_node_or_t *)(node))
#define RNODE_MASGN(node) ((rb_node_masgn_t *)(node))
#define RNODE_LASGN(node) ((rb_node_lasgn_t *)(node))
#define RNODE_DASGN(node) ((rb_node_dasgn_t *)(node))
#define RNODE_GASGN(node) ((rb_node_gasgn_t *)(node))
#define RNODE_IASGN(node) ((rb_node_iasgn_t *)(node))
#define RNODE_CDECL(node) ((rb_node_cdecl_t *)(node))
#define RNODE_CVASGN(node) ((rb_node_cvasgn_t *)(node))
#define RNODE_OP_ASGN1(node) ((rb_node_op_asgn1_t *)(node))
#define RNODE_OP_ASGN2(node) ((rb_node_op_asgn2_t *)(node))
#define RNODE_OP_ASGN_AND(node) ((rb_node_op_asgn_and_t *)(node))
#define RNODE_OP_ASGN_OR(node) ((rb_node_op_asgn_or_t *)(node))
#define RNODE_OP_CDECL(node) ((rb_node_op_cdecl_t *)(node))
#define RNODE_CALL(node) ((rb_node_call_t *)(node))
#define RNODE_OPCALL(node) ((rb_node_opcall_t *)(node))
#define RNODE_FCALL(node) ((rb_node_fcall_t *)(node))
#define RNODE_VCALL(node) ((rb_node_vcall_t *)(node))
#define RNODE_QCALL(node) ((rb_node_qcall_t *)(node))
#define RNODE_SUPER(node) ((rb_node_super_t *)(node))
#define RNODE_ZSUPER(node) ((rb_node_zsuper_t *)(node))
#define RNODE_LIST(node) ((rb_node_list_t *)(node))
#define RNODE_ZLIST(node) ((rb_node_zlist_t *)(node))
#define RNODE_HASH(node) ((rb_node_hash_t *)(node))
#define RNODE_RETURN(node) ((rb_node_return_t *)(node))
#define RNODE_YIELD(node) ((rb_node_yield_t *)(node))
#define RNODE_LVAR(node) ((rb_node_lvar_t *)(node))
#define RNODE_DVAR(node) ((rb_node_dvar_t *)(node))
#define RNODE_GVAR(node) ((rb_node_gvar_t *)(node))
#define RNODE_IVAR(node) ((rb_node_ivar_t *)(node))
#define RNODE_CONST(node) ((rb_node_const_t *)(node))
#define RNODE_CVAR(node) ((rb_node_cvar_t *)(node))
#define RNODE_NTH_REF(node) ((rb_node_nth_ref_t *)(node))
#define RNODE_BACK_REF(node) ((rb_node_back_ref_t *)(node))
#define RNODE_MATCH(node) ((rb_node_match_t *)(node))
#define RNODE_MATCH2(node) ((rb_node_match2_t *)(node))
#define RNODE_MATCH3(node) ((rb_node_match3_t *)(node))
#define RNODE_INTEGER(node) ((rb_node_integer_t *)(node))
#define RNODE_FLOAT(node) ((rb_node_float_t *)(node))
#define RNODE_RATIONAL(node) ((rb_node_rational_t *)(node))
#define RNODE_IMAGINARY(node) ((rb_node_imaginary_t *)(node))
#define RNODE_STR(node) ((rb_node_str_t *)(node))
#define RNODE_DSTR(node) ((rb_node_dstr_t *)(node))
#define RNODE_XSTR(node) ((rb_node_xstr_t *)(node))
#define RNODE_DXSTR(node) ((rb_node_dxstr_t *)(node))
#define RNODE_EVSTR(node) ((rb_node_evstr_t *)(node))
#define RNODE_REGX(node) ((rb_node_regx_t *)(node))
#define RNODE_DREGX(node) ((rb_node_dregx_t *)(node))
#define RNODE_ONCE(node) ((rb_node_once_t *)(node))
#define RNODE_ARGS(node) ((rb_node_args_t *)(node))
#define RNODE_ARGS_AUX(node) ((rb_node_args_aux_t *)(node))
#define RNODE_OPT_ARG(node) ((rb_node_opt_arg_t *)(node))
#define RNODE_KW_ARG(node) ((rb_node_kw_arg_t *)(node))
#define RNODE_POSTARG(node) ((rb_node_postarg_t *)(node))
#define RNODE_ARGSCAT(node) ((rb_node_argscat_t *)(node))
#define RNODE_ARGSPUSH(node) ((rb_node_argspush_t *)(node))
#define RNODE_SPLAT(node) ((rb_node_splat_t *)(node))
#define RNODE_BLOCK_PASS(node) ((rb_node_block_pass_t *)(node))
#define RNODE_DEFN(node) ((rb_node_defn_t *)(node))
#define RNODE_DEFS(node) ((rb_node_defs_t *)(node))
#define RNODE_ALIAS(node) ((rb_node_alias_t *)(node))
#define RNODE_VALIAS(node) ((rb_node_valias_t *)(node))
#define RNODE_UNDEF(node) ((rb_node_undef_t *)(node))
#define RNODE_CLASS(node) ((rb_node_class_t *)(node))
#define RNODE_MODULE(node) ((rb_node_module_t *)(node))
#define RNODE_SCLASS(node) ((rb_node_sclass_t *)(node))
#define RNODE_COLON2(node) ((rb_node_colon2_t *)(node))
#define RNODE_COLON3(node) ((rb_node_colon3_t *)(node))
#define RNODE_DOT2(node) ((rb_node_dot2_t *)(node))
#define RNODE_DOT3(node) ((rb_node_dot3_t *)(node))
#define RNODE_FLIP2(node) ((rb_node_flip2_t *)(node))
#define RNODE_FLIP3(node) ((rb_node_flip3_t *)(node))
#define RNODE_SELF(node) ((rb_node_self_t *)(node))
#define RNODE_NIL(node) ((rb_node_nil_t *)(node))
#define RNODE_TRUE(node) ((rb_node_true_t *)(node))
#define RNODE_FALSE(node) ((rb_node_false_t *)(node))
#define RNODE_ERRINFO(node) ((rb_node_errinfo_t *)(node))
#define RNODE_DEFINED(node) ((rb_node_defined_t *)(node))
#define RNODE_POSTEXE(node) ((rb_node_postexe_t *)(node))
#define RNODE_SYM(node) ((rb_node_sym_t *)(node))
#define RNODE_DSYM(node) ((rb_node_dsym_t *)(node))
#define RNODE_ATTRASGN(node) ((rb_node_attrasgn_t *)(node))
#define RNODE_LAMBDA(node) ((rb_node_lambda_t *)(node))
#define RNODE_ARYPTN(node) ((rb_node_aryptn_t *)(node))
#define RNODE_HSHPTN(node) ((rb_node_hshptn_t *)(node))
#define RNODE_FNDPTN(node) ((rb_node_fndptn_t *)(node))
#define RNODE_LINE(node) ((rb_node_line_t *)(node))
#define RNODE_FILE(node) ((rb_node_file_t *)(node))
#define RNODE_ENCODING(node) ((rb_node_encoding_t *)(node))
/* FL : 0..4: T_TYPES, 5: KEEP_WB, 6: PROMOTED, 7: FINALIZE, 8: UNUSED, 9: UNUSED, 10: EXIVAR, 11: FREEZE */
/* NODE_FL: 0..4: UNUSED, 5: UNUSED, 6: UNUSED, 7: NODE_FL_NEWLINE,