DECL_OO(const ID_List, type_path, = str2list(env, name, &array_depth, gwi->loc))
Type_Decl* type_decl = new_type_decl(env->gwion->mp, type_path);
if(array_depth) {
- Array_Sub array_sub = new_array_sub(env->gwion->mp, NULL);
+ Array_Sub array = new_array_sub(env->gwion->mp, NULL);
for(m_uint i = 1; i < array_depth; i++)
- array_sub = prepend_array_sub(array_sub, NULL);
- type_decl = add_type_decl_array(type_decl, array_sub);
+ array = prepend_array_sub(array, NULL);
+ type_decl->array = array;
}
return type_decl;
}
Type_Decl* td = new_type_decl(gwi->gwion->st->p, new_id_list(gwi->gwion->st->p, insert_symbol(gwi->gwion->st, "float"), GWI_LOC));
Exp e = new_exp_prim_int(gwi->gwion->st->p, 1, GWI_LOC);
Array_Sub array = new_array_sub(gwi->gwion->st->p, e);
- add_type_decl_array(td, array);
+ td->array = array;
GWI_BB(gwi_class_ext(gwi, td))
GWI_BB(gwi_class_end(gwi))
return GW_OK;