}
#define env_body(a,b,c) env_body(a,b,(_exp_func)c)
-ANN m_bool scanx_parent(const Type t, const _exp_func f, void *d);
-#define scanx_parent(a,b,c) scanx_parent(a, (_exp_func)b, c)
-
-
ANN m_bool scanx_cdef(const Env, void *,const Class_Def,
const _exp_func f_cdef, const _exp_func f_union);
ANN static m_bool cdef_parent(const Env env, const Class_Def cdef) {
if(cdef->base.tmpl && cdef->base.tmpl->list)
CHECK_BB(template_push_types(env, cdef->base.tmpl))
-// const m_bool ret = scanx_parent(cdef->base.type, scan2_parent, env);
const m_bool ret = scan2_parent(env, cdef);
if(cdef->base.tmpl && cdef->base.tmpl->list)
nspc_pop_type(env->gwion->mp, env->curr);
return ret;
}
-#undef scanx_parent
-
__attribute__((returns_nonnull))
ANN Type unflag_type(const Type t) {
const Type type = !GET_FLAG(t, nonnull) ? t : t->e->parent;
return unflag_type(type);
}
-__attribute__((returns_nonnull))
-static inline Class_Def get_type_def(const Type t) {
- const Type type = get_type(t);
- return type->e->def;
-}
-
-ANN m_bool
-scanx_parent(const Type t, const _exp_func f, void* d) {
- const Class_Def def = get_type_def(t);
- return def ? f(d, def) : GW_OK;
-}
-
ANN m_bool scanx_cdef(const Env env, void* opt, const Class_Def cdef,
const _exp_func f_cdef, const _exp_func f_union) {
const Type t = get_type(cdef->base.type);