-Subproject commit 4b0056d3f830edb2cd22eb66ac8e47e483464f1b
+Subproject commit a80647e2685d3a1650acde3096a180c3888888ca
(_exp_func)prefix##_enum_def, (_exp_func)prefix##_union_def, \
(_exp_func)prefix##_fptr_def, (_exp_func)prefix##_type_def \
}; \
-ANN static inline m_bool prefix##_section(const void* a, /* const */ Section* section) { GWDEBUG_EXE \
- void* d = §ion->d.stmt_list; \
+ANN static inline m_bool prefix##_section(const void* a, /* const */ Section* section) { \
+ void* d = §ion->d.stmt_list; \
return section_func[section->section_type](a, *(void**)d); \
}
#define HANDLE_EXP_FUNC(prefix, type, ret) \
DECL_EXP_FUNC(prefix) \
-ANN type prefix##_exp(const Env env, Exp exp) { GWDEBUG_EXE \
+ANN type prefix##_exp(const Env env, Exp exp) { \
do CHECK_BB(exp_func[exp->exp_type](env, &exp->d)) \
while((exp = exp->next)); \
return ret; \
ANN m_bool scan2_exp(const Env, Exp);
#define describe_stmt_func(prefix, name, type, prolog, exp) \
-ANN static m_bool prefix##_stmt_##name(const Env env, const type stmt) { GWDEBUG_EXE \
+ANN static m_bool prefix##_stmt_##name(const Env env, const type stmt) { \
RET_NSPC(exp) \
}
ERR_O(exp_self(exp)->pos, _("arguments do not match for template call"))
}
+#define next_arg(type) \
+ANN static inline type next_arg_##type(const type e) { \
+ const type next = e->next; \
+ if(next) \
+ gw_err(","); \
+ return next; \
+}
+next_arg(Exp)
+next_arg(Arg_List)
+
ANN static void print_current_args(Exp e) {
gw_err(_("and not\n "));
do gw_err(" \033[32m%s\033[0m", e->type->name);
- while((e = e->next) && gw_err(","));
+ while((e = next_arg_Exp(e)));
gw_err("\n");
}
ANN static void print_arg(Arg_List e) {
do gw_err(" \033[32m%s\033[0m \033[1m%s\033[0m", e->type ? e->type->name : NULL,
e->var_decl->xid ? s_name(e->var_decl->xid) : "");
- while((e = e->next) && gw_err(","));
+ while((e = next_arg_Arg_List(e)));
}
ANN2(1) static void function_alternative(const Env env, const Type f, const Exp args, const loc_t pos){
do {
gw_err("(%s) ", up->name);
const Arg_List e = up->def->base->args;
- e ? print_arg(e) : (void)gw_err("\033[32mvoid\033[0m");
+ if(e)
+ print_arg(e);
+ else
+ gw_err("\033[32mvoid\033[0m");
gw_err("\n");
} while((up = up->next));
- args ? print_current_args(args) : (void)gw_err(_("and not:\n \033[32mvoid\033[0m\n"));
+ if(args)
+ print_current_args(args);
+ else
+ gw_err(_("and not:\n \033[32mvoid\033[0m\n"));
}
ANN static m_uint get_type_number(ID_List list) {
-Subproject commit b84961d25c2ae0b31eae301d211d72159ce945e7
+Subproject commit 3d2be8fdf552bdded221ddb266d55043c288da4a