-Subproject commit 1c3afd609f38c79cdfa58346c8dbc6112bedcca4
+Subproject commit 0fc5575bcf9215b59c7b4723c7efd55615217c02
ANN static m_int gwi_item_tmpl(const Gwi gwi) {
Stmt_List slist = new_mp_vector(gwi->gwion->mp, Stmt, 1);
- mp_vector_set(slist, Stmt, 0, ((Stmt) {
- .stmt_type = ae_stmt_exp,
- .d = { .stmt_exp = { .val = gwi->ck->exp } },
- .loc = gwi->loc
- }));
+ mp_vector_set(slist, Stmt, 0, MK_STMT_EXP(gwi->loc, gwi->ck->exp));
Section section = MK_SECTION(stmt, stmt_list, slist);
-// const Ast body = new_ast(mp, section, NULL);
-// gwi_body(gwi, body);
gwi_body(gwi, §ion);
mp_free2(gwi->gwion->mp, sizeof(ImportCK), gwi->ck);
gwi->ck = NULL;
Exp* bin = new_exp_binary(env->gwion->mp, lhs, impl->e->d.prim.d.var,
rhs, impl->e->loc);
Stmt_List code = new_mp_vector(env->gwion->mp, Stmt, 1);
- mp_vector_set(code, Stmt, 0, MK_STMT(ae_stmt_return, impl->e->loc,
- .stmt_exp = { .val = bin }));
+ mp_vector_set(code, Stmt, 0, MK_STMT_RETURN(impl->e->loc, bin));
const Func_Def def = new_func_def(env->gwion->mp, base, code);
def->base->tag.sym = impl->e->d.prim.d.var;
// use envset
func->d.exp_binary.lhs = call;
func->d.exp_binary.op = chuck;
CHECK_BN(traverse_exp(env, func));
- Stmt one = { .d = { .stmt_exp = { .val = func }}, .stmt_type = ae_stmt_exp, .loc = func->loc };
+ Stmt one = MK_STMT_EXP(func->loc, func);
Exp* samp = new_prim_id(mp, insert_symbol(env->gwion->st, "samp"), func->loc);
Exp* _now = new_prim_id(mp, insert_symbol(env->gwion->st, "now"), func->loc);
Exp* time = new_exp_binary(mp, samp, chuck, _now, func->loc);
CHECK_BN(traverse_exp(env, time));
- Stmt two = { .d = { .stmt_exp = { .val = time }}, .stmt_type = ae_stmt_exp, .loc = func->loc };
-
+ Stmt two = MK_STMT_EXP(func->loc, time);
free_exp(mp, bin->lhs);
free_exp(mp, bin->rhs);
Stmt_List slist = new_mp_vector(mp, Stmt, 2);
// casting while defining it*
Exp* ret_id = new_prim_id(env->gwion->mp, insert_symbol("self"), when->loc);
ret_id->d.prim.value = new_value(env, tdef->type, "self", tdef->tag.loc);
- Stmt ret = {
- .stmt_type = ae_stmt_return, .d = { .stmt_exp = { .val = ret_id }},
- .loc = when->loc
- };
+ Stmt ret = MK_STMT_RETURN(when->loc, ret_id);
mp_vector_set(fdef->d.code, Stmt, 1, ret);
ret_id->type = tdef->type;
}
Exp* arg = partial_call(env, args, earg);
Exp* exp = new_exp_call(env->gwion->mp, efun, arg, efun->loc);
Stmt_List code = new_mp_vector(env->gwion->mp, Stmt, 1);
- mp_vector_set(code, Stmt, 0, MK_STMT(ae_stmt_return, efun->loc,
- .stmt_exp = { .val = exp }));
+ mp_vector_set(code, Stmt, 0, MK_STMT_RETURN(efun->loc, exp));
return code;
}