From: fennecdjay Date: Thu, 3 Oct 2024 07:28:33 +0000 (+0200) Subject: :fire: import statements and using X-Git-Tag: nightly~4 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=699a228a6482a6c73dfac6dde6fb68e073965758;p=gwion.git :fire: import statements and using --- diff --git a/include/env/nspc.h b/include/env/nspc.h index 3a7f7abc..d7ffb30f 100644 --- a/include/env/nspc.h +++ b/include/env/nspc.h @@ -5,7 +5,7 @@ typedef struct NspcInfo_ { Scope type; Scope func; Scope trait; - MP_Vector *using; + MP_Vector *gwusing; } NspcInfo; typedef struct NspcOp_ { diff --git a/include/env/type.h b/include/env/type.h index be29078a..b6c26d97 100644 --- a/include/env/type.h +++ b/include/env/type.h @@ -43,7 +43,8 @@ enum tflag { tflag_packed = 1 << 23, tflag_compound = 1 << 24, tflag_release = 1 << 25, // mark structs that need release - tflag_primitive = 1 << 26, // mark structs that need release + tflag_primitive = 1 << 26, + tflag_cxx = 1 << 27, // do not emit parent ctors for cxx types } __attribute__((packed)); struct Type_ { diff --git a/include/import/fdef.h b/include/import/fdef.h index 48cbfaf4..d465d52b 100644 --- a/include/import/fdef.h +++ b/include/import/fdef.h @@ -1,15 +1,15 @@ #ifndef __IMPORT_FUNC #define __IMPORT_FUNC -ANN bool gwi_func_ini(const Gwi gwi, const __restrict__ m_str type, - const __restrict__ m_str name); -ANN bool gwi_func_arg(const Gwi gwi, const __restrict__ m_str t, - const __restrict__ m_str n); +ANN bool gwi_func_ini(const Gwi gwi, const m_str type, + const m_str name); +ANN bool gwi_func_arg(const Gwi gwi, const m_str t, + const m_str n); ANN bool gwi_func_end(const Gwi gwi, const f_xfun addr, const ae_flag flag); -ANN bool gwi_fptr_ini(const Gwi gwi, const m_str __restrict__ type, - const __restrict__ m_str name); +ANN bool gwi_fptr_ini(const Gwi gwi, const m_str type, + const m_str name); ANN Type gwi_fptr_end(const Gwi gwi, const ae_flag flag); -ANN bool gwi_func_arg(const Gwi gwi, const restrict m_str t, - const restrict m_str n); +ANN bool gwi_func_arg(const Gwi gwi, const m_str t, + const m_str n); ANN void ck_clean_fdef(MemPool, ImportCK *); #endif diff --git a/include/parse.h b/include/parse.h index a8b8d650..4d2a2529 100644 --- a/include/parse.h +++ b/include/parse.h @@ -50,14 +50,14 @@ #define RET_NSPC(exp) \ ++env->scope->depth; \ - const uint32_t nusing = env->curr->info->using \ - ? env->curr->info->using->len \ + const uint32_t nusing = env->curr->info->gwusing \ + ? env->curr->info->gwusing->len \ : 0; \ nspc_push_value(env->gwion->mp, env->curr); \ const bool ret = exp; \ nspc_pop_value(env->gwion->mp, env->curr); \ if(nusing) \ - env->curr->info->using->len = nusing; \ + env->curr->info->gwusing->len = nusing; \ --env->scope->depth; \ return ret; diff --git a/src/clean.c b/src/clean.c index 6ba71551..e66ea2e6 100644 --- a/src/clean.c +++ b/src/clean.c @@ -240,6 +240,24 @@ ANN static void clean_stmt_defer(Clean *a, Stmt_Defer b) { clean_stmt(a, b->stmt); } +ANN static void clean_stmt_using(Clean *a, Stmt_Using b) { + if(b->tag.sym) + clean_exp(a, b->d.exp); + else + clean_type_decl(a, b->d.td); +} + +ANN static void clean_stmt_import(Clean *a, Stmt_Import b) { + if(b->selection) { + for(uint32_t i = 0; i < b->selection->len; i++) { + Stmt_Using item = mp_vector_at(b->selection, struct Stmt_Using_, i); + if(item->d.exp) + clean_exp(a, item->d.exp); + } + } +} + + ANN static void clean_dummy(Clean *a NUSED, void *b NUSED) {} #define clean_stmt_jump clean_dummy #define clean_stmt_pp clean_dummy @@ -248,9 +266,6 @@ ANN static void clean_dummy(Clean *a NUSED, void *b NUSED) {} #define clean_stmt_retry clean_dummy #define clean_stmt_spread clean_dummy -// TODO: check me -#define clean_stmt_using clean_dummy - DECL_STMT_FUNC(clean, void, Clean *) ANN static void clean_stmt(Clean *a, Stmt* b) { clean_stmt_func[b->stmt_type](a, &b->d); diff --git a/src/emit/emit.c b/src/emit/emit.c index 947b10dc..20678f40 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -317,7 +317,7 @@ ANN2(1, 2) static ArrayInfo *emit_array_extend(const Emitter emit, const Type t, Exp* e, const uint is_ref); ANN static bool emit_pre_ctor(const Emitter emit, const Type type) { - if (type->info->parent) { + if (type->info->parent && !tflag(type, tflag_cxx)) { CHECK_B(emit_pre_ctor(emit, type->info->parent)); if (tflag(type, tflag_typedef) && type->info->parent->array_depth) CHECK_B(emit_array_extend(emit, type, type->info->cdef->base.ext->array->exp, false)); @@ -2577,6 +2577,7 @@ ANN static bool emit_stmt_retry(const Emitter emit, #define emit_stmt_until emit_stmt_flow #define emit_stmt_spread dummy_func #define emit_stmt_using dummy_func +#define emit_stmt_import dummy_func DECL_STMT_FUNC(emit, bool, Emitter); diff --git a/src/env/env_utils.c b/src/env/env_utils.c index 92cf65f1..f839e8df 100644 --- a/src/env/env_utils.c +++ b/src/env/env_utils.c @@ -50,21 +50,21 @@ ANN Type find_initial(const Env env, const Symbol xid) { const Nspc nspc = (Nspc)vector_at(v, i - 1); RETURN_TYPE(nspc_lookup_type1(nspc, xid)); } - if(env->curr->info->using) { - for(uint32_t i = 0; i < env->curr->info->using->len; i++) { - Stmt_Using using = *mp_vector_at(env->curr->info->using, Stmt_Using, i); - if(!using->alias.sym) { + if(env->curr->info->gwusing) { + for(uint32_t i = 0; i < env->curr->info->gwusing->len; i++) { + Stmt_Using using = *mp_vector_at(env->curr->info->gwusing, Stmt_Using, i); + if(!using->tag.sym) { const Type owner = known_type(env, using->d.td); if(owner) { const Type ret = nspc_lookup_type0(owner->nspc, xid); if(ret) return ret; } - } else if(xid == using->alias.sym) { + } else if(xid == using->tag.sym) { if(!using->d.exp->type) CHECK_B(traverse_exp(env, using->d.exp)); if(is_class(env->gwion, using->d.exp->type)) return using->d.exp->type->info->base_type; - ERR_B(using->alias.loc, "found an alias %s but it's not a type", s_name(using->alias.sym)); + ERR_B(using->tag.loc, "found an alias %s but it's not a type", s_name(using->tag.sym)); } }} return NULL; diff --git a/src/env/nspc.c b/src/env/nspc.c index 6bf4c684..efd9880a 100644 --- a/src/env/nspc.c +++ b/src/env/nspc.c @@ -48,8 +48,8 @@ ANN void free_nspc(const Nspc a, const Gwion gwion) { nspc_free_trait(a, gwion); if(a->operators) free_operators(a->operators, gwion); nspc_free_type(a, gwion); - if (a->info->using) - free_mp_vector(gwion->mp, Stmt_Using, a->info->using); + if (a->info->gwusing) + free_mp_vector(gwion->mp, Stmt_Using, a->info->gwusing); if (a->class_data && a->class_data_size) mp_free2(gwion->mp, a->class_data_size, a->class_data); if (a->vtable.ptr) vector_release(&a->vtable); diff --git a/src/lib/union.c b/src/lib/union.c index 30191bf2..d9284898 100644 --- a/src/lib/union.c +++ b/src/lib/union.c @@ -63,6 +63,7 @@ ANN void union_release(const VM_Shred shred, const Type t, const m_bit *data) { const Value v = (Value)map_at(map, idx - 1); if (tflag(v->type, tflag_compound)) compound_release(shred, v->type, data + SZ_INT); + // what if there is an union instead } } diff --git a/src/parse/check.c b/src/parse/check.c index 2a412d44..8bfa07ff 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -398,10 +398,10 @@ ANN static Type prim_id_non_res(const Env env, const Symbol *data) { return v->type; } } - if(env->curr->info->using) { - for(uint32_t i = 0; i < env->curr->info->using->len; i++) { - Stmt_Using using = *mp_vector_at(env->curr->info->using, Stmt_Using, i); - if(!using->alias.sym) { + if(env->curr->info->gwusing) { + for(uint32_t i = 0; i < env->curr->info->gwusing->len; i++) { + Stmt_Using using = *mp_vector_at(env->curr->info->gwusing, Stmt_Using, i); + if(!using->tag.sym) { // NOTE: we know type is valid and has nspc const Type type = known_type(env, using->d.td); Value value = nspc_lookup_value1(type->nspc, sym); @@ -413,10 +413,12 @@ ANN static Type prim_id_non_res(const Env env, const Symbol *data) { exp->d.exp_dot.xid = insert_symbol(value->name); return check_exp(env, exp); } - } else if(sym == using->alias.sym) { + } else if(sym == using->tag.sym) { Exp *exp = prim_exp(data); + const loc_t loc = exp->loc; Exp *base = cpy_exp(env->gwion->mp, using->d.exp); *exp = *base; + exp->loc = loc; mp_free2(env->gwion->mp, sizeof(Exp), base); return check_exp(env, exp); } @@ -1749,7 +1751,7 @@ ANN static bool check_stmt_defer(const Env env, const Stmt_Defer stmt) { } ANN static bool check_stmt_using(const Env env, const Stmt_Using stmt) { - if(!stmt->alias.sym) { + if(!stmt->tag.sym) { DECL_B(const Type, type, = known_type(env, stmt->d.td)); for(m_uint i = 0; i < map_size(&type->nspc->info->value->map); ++i) { const Symbol sym = (Symbol)VKEY(&type->nspc->info->value->map, i); @@ -1765,21 +1767,23 @@ ANN static bool check_stmt_using(const Env env, const Stmt_Using stmt) { } } } else { - const Value value = nspc_lookup_value1(env->curr, stmt->alias.sym); + const Value value = nspc_lookup_value1(env->curr, stmt->tag.sym); if(value) { char msg[256]; sprintf(msg, "{Y}%s{0} is already defined", value->name); - gwlog_error(_(msg), NULL, env->name, stmt->alias.loc, 0); + gwlog_error(_(msg), NULL, env->name, stmt->tag.loc, 0); declared_here(value); return false; } if(!stmt->d.exp->type) CHECK_B(check_exp(env, stmt->d.exp)); } - mp_vector_add(env->gwion->mp, &env->curr->info->using, Stmt_Using, stmt); + mp_vector_add(env->gwion->mp, &env->curr->info->gwusing, Stmt_Using, stmt); return true; } +#define check_stmt_import dummy_func + #define check_stmt_retry dummy_func #define check_stmt_spread dummy_func DECL_STMT_FUNC(check, bool, Env) @@ -1790,8 +1794,8 @@ ANN bool check_stmt(const Env env, Stmt* stmt) { ANN bool check_stmt_list(const Env env, Stmt_List l) { bool ok = true; - const uint32_t nusing = env->curr->info->using - ? env->curr->info->using->len + const uint32_t nusing = env->curr->info->gwusing + ? env->curr->info->gwusing->len : 0; for(m_uint i = 0; i < l->len; i++) { Stmt* stmt = mp_vector_at(l, Stmt, i); @@ -1799,8 +1803,8 @@ ANN bool check_stmt_list(const Env env, Stmt_List l) { if(!check_stmt(env, stmt)) POISON_NODE(ok, env, stmt); } - if(env->curr->info->using) - env->curr->info->using->len = nusing; + if(env->curr->info->gwusing) + env->curr->info->gwusing->len = nusing; return ok; } diff --git a/src/parse/scan0.c b/src/parse/scan0.c index 231251eb..67309333 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -371,8 +371,8 @@ ANN static Type scan0_class_def_init(const Env env, const Class_Def cdef) { ANN static bool scan0_stmt_list(const Env env, Stmt_List l) { bool ok = true; - const uint32_t nusing = env->curr->info->using - ? env->curr->info->using->len + const uint32_t nusing = env->curr->info->gwusing + ? env->curr->info->gwusing->len : 0; for(m_uint i = 0; i < l->len; i++) { Stmt* stmt = mp_vector_at(l, Stmt, i); @@ -380,21 +380,22 @@ ANN static bool scan0_stmt_list(const Env env, Stmt_List l) { if (stmt->stmt_type == ae_stmt_pp) { if (stmt->d.stmt_pp.pp_type == ae_pp_include) env->name = stmt->d.stmt_pp.data; - else if (stmt->d.stmt_pp.pp_type == ae_pp_import) { - if(!plugin_ini(env->gwion, stmt->d.stmt_pp.data, stmt->loc)) - POISON_NODE(ok, env, stmt); - } } else if(stmt->stmt_type == ae_stmt_using) { - if(!env->curr->info->using) - env->curr->info->using = new_mp_vector(env->gwion->mp, Stmt_Using, 0); - mp_vector_add(env->gwion->mp, &env->curr->info->using, Stmt_Using, &stmt->d.stmt_using); - } /*else if (stmt->stmt_type == ae_stmt_spread) { - if(!spreadable(env)) // TODO: we can prolly get rid of this - ERR_OK_NODE(ok, stmt, stmt->loc, "spread statement outside of variadic environment"); - }*/ + if(!env->curr->info->gwusing) + env->curr->info->gwusing = new_mp_vector(env->gwion->mp, Stmt_Using, 0); + mp_vector_add(env->gwion->mp, &env->curr->info->gwusing, Stmt_Using, &stmt->d.stmt_using); + } else if(stmt->stmt_type == ae_stmt_import) { + if(!env->scope->depth && !env->class_def) { + if(!plugin_ini(env->gwion, s_name(stmt->d.stmt_import.tag.sym), stmt->loc)) + POISON_NODE(ok, env, stmt); + } else { + env_err(env, stmt->loc, "import statements must be at file scope"); + POISON_NODE(ok, env, stmt); + } + } } - if(env->curr->info->using && env->scope->depth) - env->curr->info->using->len = nusing; + if(env->curr->info->gwusing && env->scope->depth) + env->curr->info->gwusing->len = nusing; return ok; } diff --git a/src/parse/scan1.c b/src/parse/scan1.c index f54912e8..e84225ba 100644 --- a/src/parse/scan1.c +++ b/src/parse/scan1.c @@ -266,14 +266,16 @@ ANN static inline bool scan1_stmt_match_case(const restrict Env env, ANN static inline bool scan1_stmt_using(const restrict Env env, const Stmt_Using stmt) { - if(stmt->alias.sym) + if(stmt->tag.sym) CHECK_B(scan1_exp(env, stmt->d.exp)); - if(!env->curr->info->using) - env->curr->info->using = new_mp_vector(env->gwion->mp, Stmt_Using, 0); - mp_vector_add(env->gwion->mp, &env->curr->info->using, Stmt_Using, stmt); + if(!env->curr->info->gwusing) + env->curr->info->gwusing = new_mp_vector(env->gwion->mp, Stmt_Using, 0); + mp_vector_add(env->gwion->mp, &env->curr->info->gwusing, Stmt_Using, stmt); return true; } +#define scan1_stmt_import dummy_func + ANN static inline bool _scan1_stmt_match(const restrict Env env, const Stmt_Match stmt) { if (stmt->where) CHECK_B(scan1_stmt(env, stmt->where)); @@ -652,8 +654,8 @@ ANN static void dead_code(const Env env, Stmt_List l, uint32_t len) { ANN static bool scan1_stmt_list(const Env env, Stmt_List l) { uint32_t i; bool ok = true; - const uint32_t nusing = env->curr->info->using - ? env->curr->info->using->len + const uint32_t nusing = env->curr->info->gwusing + ? env->curr->info->gwusing->len : 0; for(i = 0; i < l->len; i++) { Stmt* stmt = mp_vector_at(l, Stmt, i); @@ -664,8 +666,8 @@ ANN static bool scan1_stmt_list(const Env env, Stmt_List l) { } if(end_flow(stmt)) break; } - if(env->curr->info->using) - env->curr->info->using->len = nusing; + if(env->curr->info->gwusing) + env->curr->info->gwusing->len = nusing; if(++i < l->len) dead_code(env, l, i); return ok; } diff --git a/src/parse/scan2.c b/src/parse/scan2.c index fb318edf..f2986281 100644 --- a/src/parse/scan2.c +++ b/src/parse/scan2.c @@ -263,12 +263,14 @@ ANN static bool scan2_stmt_defer(const Env env, const Stmt_Defer stmt) { ANN static inline bool scan2_stmt_using(const restrict Env env, const Stmt_Using stmt) { - if(stmt->alias.sym) + if(stmt->tag.sym) CHECK_B(scan2_exp(env, stmt->d.exp)); - mp_vector_add(env->gwion->mp, &env->curr->info->using, Stmt_Using, stmt); + mp_vector_add(env->gwion->mp, &env->curr->info->gwusing, Stmt_Using, stmt); return true; } +#define scan2_stmt_import dummy_func + #define scan2_stmt_spread dummy_func DECL_STMT_FUNC(scan2, bool, Env) @@ -279,8 +281,8 @@ ANN static bool scan2_stmt(const Env env, Stmt* stmt) { ANN static bool scan2_stmt_list(const Env env, Stmt_List l) { bool ok = true; - const uint32_t nusing = env->curr->info->using - ? env->curr->info->using->len + const uint32_t nusing = env->curr->info->gwusing + ? env->curr->info->gwusing->len : 0; for(m_uint i = 0; i < l->len; i++) { Stmt* stmt = mp_vector_at(l, Stmt, i); @@ -288,8 +290,8 @@ ANN static bool scan2_stmt_list(const Env env, Stmt_List l) { if(!scan2_stmt(env, stmt)) POISON_NODE(ok, env, stmt); } - if(env->curr->info->using) - env->curr->info->using->len = nusing; + if(env->curr->info->gwusing) + env->curr->info->gwusing->len = nusing; return ok; } diff --git a/src/parse/validate.c b/src/parse/validate.c index cd0226c7..4fc3d029 100644 --- a/src/parse/validate.c +++ b/src/parse/validate.c @@ -85,6 +85,7 @@ ANN static bool validate_prim_id(Validate *a, Exp_Primary *b) { struct SpecialId_ *spid = specialid_get(a->env->gwion, b->d.var); if(spid) return true; if (!b->value) {// assume it's an operator + // turns out it could be a _ in a case expression env_err(a->env, exp_self(b)->loc, "missing value for operator"); return false; } @@ -382,6 +383,7 @@ ANN static bool validate_stmt_spread(Validate *a NUSED, Spread_Def b NUSED) { } #define validate_stmt_using dummy_func +#define validate_stmt_import dummy_func DECL_STMT_FUNC(validate, bool, Validate*) ANN static bool validate_stmt(Validate *a, Stmt* b) { diff --git a/src/plug.c b/src/plug.c index 3e908251..e251af59 100644 --- a/src/plug.c +++ b/src/plug.c @@ -153,6 +153,8 @@ ANN bool plug_run(const struct Gwion_ *gwion, const Map mod) { return true; } +ANN static bool _plugin_ini(struct Gwion_ *gwion, const m_str iname, const loc_t loc, const bool initial); + ANN static bool dependencies(struct Gwion_ *gwion, const Plug plug, const loc_t loc) { const gwdepend_t dep = plug->depend; bool ret = true; @@ -160,8 +162,8 @@ ANN static bool dependencies(struct Gwion_ *gwion, const Plug plug, const loc_t m_str *const base = dep(); m_str * deps = base; while (*deps) { - if(!plugin_ini(gwion, *deps, loc)) { - gw_err("%s: no such plugin (dependency)\n", *deps); + if(!_plugin_ini(gwion, *deps, loc, false)) { + env_err(gwion->env, loc, "%s: no such plugin (dependency)\n", *deps); ret = false; } ++deps; @@ -177,7 +179,10 @@ ANN static void set_parent(const Nspc nspc, const Gwion gwion ) { } ANN static bool start(const Plug plug, const Gwion gwion, const m_str iname, const loc_t loc) { - if(!plug->plugin) return false; + if(!plug->plugin) { + env_err(gwion->env, loc, "%s: file exist but does not contain plugin\n", iname); + return false; + } const bool cdoc = gwion->data->cdoc; gwion->data->cdoc = 0; // check cdoc CHECK_B(dependencies(gwion, plug, loc)); @@ -203,14 +208,16 @@ ANN static bool started(const Plug plug, const Gwion gwion, const m_str iname) { return true; } -ANN static bool _plugin_ini(struct Gwion_ *gwion, const m_str iname, const loc_t loc) { +ANN static bool _plugin_ini(struct Gwion_ *gwion, const m_str iname, const loc_t loc, const bool initial) { const Map map = &gwion->data->plugs->map; for (m_uint i = 0; i < map_size(map); ++i) { const Plug plug = (Plug)VVAL(map, i); const m_str base = (m_str)VKEY(map, i); if (!strcmp(iname, base)) { if (!plug->nspc) return start(plug, gwion, iname, loc); - else return started(plug, gwion, iname); + if(initial) + env_warn(gwion->env, loc, "%s already loaded", iname); // should be warning + return started(plug, gwion, iname); } } return false; @@ -218,7 +225,7 @@ ANN static bool _plugin_ini(struct Gwion_ *gwion, const m_str iname, const loc_t ANN bool plugin_ini(struct Gwion_ *gwion, const m_str iname, const loc_t loc) { const Env env = gwion->env; - if(!_plugin_ini(gwion, iname, loc)) { + if(!_plugin_ini(gwion, iname, loc, true)) { env_err(env, loc, "%s: no such plugin\n", iname); return false; } @@ -227,7 +234,11 @@ ANN bool plugin_ini(struct Gwion_ *gwion, const m_str iname, const loc_t loc) { ANN gwdriver_t driver_ini(const struct Gwion_ *gwion, struct SoundInfo_ *si) { const Map map = &gwion->data->plugs->map; - m_str dname = strdup(si->arg); + // NOTE: we can do better + // calculate lenght of the string til `=` if it exists + // maybe implement some mstrndup function? + // or even an mstr function that returns a string up to char + m_str dname = mstrdup(gwion->mp, si->arg); m_str opt = strchr(dname, '='); if (opt) *opt = '\0'; for (m_uint i = 0; i < map_size(map); ++i) { @@ -235,12 +246,12 @@ ANN gwdriver_t driver_ini(const struct Gwion_ *gwion, struct SoundInfo_ *si) { if (!strcmp(name, dname)) { const Plug plug = (Plug)VVAL(map, i); const gwdriver_t drv = plug->driver; - free(dname); + free_mstr(gwion->mp, dname); return drv; } } gw_err("%s: no such driver\n", dname); - free(dname); + free_mstr(gwion->mp, dname); return NULL; } @@ -254,3 +265,16 @@ ANN void *get_module(const struct Gwion_ *gwion, const m_str name) { } return NULL; } + +// TODO: make some error API from this +// NOTE: warn when a plugin is already loaded (but not when it's a dependency) +// NOTE: warn when a dependency is already loaded +// some question arises from the use of :[] in plug names +// +// +// NOTE: plugs could use args just like modules +// +// NOTE: we need gwerr gwwarn gwout +// also to set in gwiond? +// or just set one +// maybe have the message be [Foo] prefixed diff --git a/src/sema/sema.c b/src/sema/sema.c index ecd027d9..c1d96a36 100644 --- a/src/sema/sema.c +++ b/src/sema/sema.c @@ -568,6 +568,7 @@ ANN static bool sema_stmt_spread(Sema *a, Spread_Def b) { } #define sema_stmt_using dummy_func +#define sema_stmt_import dummy_func DECL_STMT_FUNC(sema, bool, Sema*) ANN static bool sema_stmt(Sema *a, Stmt* b, bool in_list) { @@ -626,6 +627,28 @@ ANN static bool sema_stmt_list(Sema *a, Stmt_List *b) { Stmt* c = mp_vector_at(*b, Stmt, i); if(!sema_stmt(a, c, true)) POISON_OK(a, c, ok); + + if(c->stmt_type == ae_stmt_import && + c->d.stmt_import.selection) { + const uint32_t len = (*b)->len; + ImportList selection = c->d.stmt_import.selection; + c->d.stmt_import.selection = NULL; + mp_vector_resize(a->mp, b, sizeof(Stmt), len + selection->len); + memmove((*b)->ptr + (i + 1 + selection->len) * sizeof(Stmt), + (*b)->ptr + (i + 1) * sizeof(Stmt), + (len - i) * sizeof(Stmt)); + for(uint32_t j = 0; j < selection->len; j++) { + Stmt *stmt = mp_vector_at(*b, Stmt, i + j + 1); + struct Stmt_Using_ using = *mp_vector_at(selection, struct Stmt_Using_, j); + stmt->d.stmt_using = using; + stmt->stmt_type = ae_stmt_using; + stmt->loc = using.tag.loc; + stmt->poison = false; + } + stmt_list = b; + free_mp_vector(a->mp, struct Stmt_Using_, selection); + } + } a->stmt_list = stmt_list; return ok; diff --git a/tests/error/require_fail.gw b/tests/error/require_fail.gw index 8f806880..5e58cee0 100644 --- a/tests/error/require_fail.gw +++ b/tests/error/require_fail.gw @@ -1,4 +1,4 @@ -#import NonExisting +import NonExisting; var ftbl f; <<< var SinOsc s >>>; diff --git a/tests/module/get_module.gw b/tests/module/get_module.gw index 61692665..ce148ee1 100644 --- a/tests/module/get_module.gw +++ b/tests/module/get_module.gw @@ -1,2 +1,2 @@ -#import get_module +import get_module; <<< __file__ >>>; diff --git a/tests/plug/array.gw b/tests/plug/array.gw index bcbe8c9e..cd0ba9b0 100644 --- a/tests/plug/array.gw +++ b/tests/plug/array.gw @@ -1,2 +1,2 @@ -#import array +import array; <<< __file__ >>>; diff --git a/tests/plug/array_in_var_name.gw b/tests/plug/array_in_var_name.gw index d50dfbaf..225ccda3 100644 --- a/tests/plug/array_in_var_name.gw +++ b/tests/plug/array_in_var_name.gw @@ -1,2 +1,2 @@ -#import array_in_var_name +import array_in_var_name; <<< __file__ >>>; diff --git a/tests/plug/array_in_var_name_fail.gw b/tests/plug/array_in_var_name_fail.gw index 9d0928c1..e8c200a4 100644 --- a/tests/plug/array_in_var_name_fail.gw +++ b/tests/plug/array_in_var_name_fail.gw @@ -1,2 +1,2 @@ -#import array_in_var_name_fail +import array_in_var_name_fail; <<< __file__ >>>; diff --git a/tests/plug/array_incoherent_in_var_name.gw b/tests/plug/array_incoherent_in_var_name.gw index b385c34c..0bc67422 100644 --- a/tests/plug/array_incoherent_in_var_name.gw +++ b/tests/plug/array_incoherent_in_var_name.gw @@ -1,2 +1,2 @@ -#import array_incoherent_in_var_name +import array_incoherent_in_var_name; <<< __file__ >>>; diff --git a/tests/plug/array_invalid_in_var_name.gw b/tests/plug/array_invalid_in_var_name.gw index d5e5542f..276ddd93 100644 --- a/tests/plug/array_invalid_in_var_name.gw +++ b/tests/plug/array_invalid_in_var_name.gw @@ -1,2 +1,2 @@ -#import array_invalid_in_var_name +import array_invalid_in_var_name; <<< __file__ >>>; diff --git a/tests/plug/callback.gw b/tests/plug/callback.gw index a0aeef7f..82182259 100644 --- a/tests/plug/callback.gw +++ b/tests/plug/callback.gw @@ -1,2 +1,2 @@ -#import callback +import callback; <<< __file__ >>>; diff --git a/tests/plug/class_template.gw b/tests/plug/class_template.gw index 6eb3670a..acbde639 100644 --- a/tests/plug/class_template.gw +++ b/tests/plug/class_template.gw @@ -1,3 +1,3 @@ -#import class_template +import class_template; var ClassTemplate:[int, int] ct; <<< ct.key >>>; diff --git a/tests/plug/class_template_fail.gw b/tests/plug/class_template_fail.gw index 57307bc2..e89492a9 100644 --- a/tests/plug/class_template_fail.gw +++ b/tests/plug/class_template_fail.gw @@ -1,2 +1,2 @@ -#import class_template_fail +import class_template_fail; <<< __file__ >>>; diff --git a/tests/plug/class_template_invalid.gw b/tests/plug/class_template_invalid.gw index 591b14e8..3eb23411 100644 --- a/tests/plug/class_template_invalid.gw +++ b/tests/plug/class_template_invalid.gw @@ -1,2 +1,2 @@ -#import class_template_invalid +import class_template_invalid; <<< __file__ >>>; diff --git a/tests/plug/compile_file.gw b/tests/plug/compile_file.gw index 97b775be..74d8a409 100644 --- a/tests/plug/compile_file.gw +++ b/tests/plug/compile_file.gw @@ -1,2 +1,2 @@ -#import compile_file +import compile_file; <<< __file__ >>>; diff --git a/tests/plug/compile_string.gw b/tests/plug/compile_string.gw index ef614241..ed5b9bf7 100644 --- a/tests/plug/compile_string.gw +++ b/tests/plug/compile_string.gw @@ -1,2 +1,2 @@ -#import compile_string +import compile_string; <<< __file__ >>>; diff --git a/tests/plug/coverage.gw b/tests/plug/coverage.gw index 2ad0c6bc..b3ab6ecc 100644 --- a/tests/plug/coverage.gw +++ b/tests/plug/coverage.gw @@ -1,5 +1,5 @@ -#import coverage -#import coverage +import coverage; +import coverage; <<< var float f >>>; var Coverage c; diff --git a/tests/plug/deps.gw b/tests/plug/deps.gw index 4ea4a97c..4ff8df41 100644 --- a/tests/plug/deps.gw +++ b/tests/plug/deps.gw @@ -1,3 +1,3 @@ -#import deps +import deps; <<< __file__ >>>; diff --git a/tests/plug/empty_union.gw b/tests/plug/empty_union.gw index c81f5739..0689d59c 100644 --- a/tests/plug/empty_union.gw +++ b/tests/plug/empty_union.gw @@ -1,2 +1,2 @@ -#import empty_union +import empty_union; <<< __file__ >>>; diff --git a/tests/plug/end_class.gw b/tests/plug/end_class.gw index 63a716d1..1f3f9a22 100644 --- a/tests/plug/end_class.gw +++ b/tests/plug/end_class.gw @@ -1,2 +1,2 @@ -#import end_class +import end_class; <<< __file__ >>>; diff --git a/tests/plug/enum.gw b/tests/plug/enum.gw index 2321b08f..6ed8d9e4 100644 --- a/tests/plug/enum.gw +++ b/tests/plug/enum.gw @@ -1,4 +1,4 @@ -#import enum +import enum; #! typed global enum <<< TYPED_ENUM0 >>>; diff --git a/tests/plug/enum_fail.gw b/tests/plug/enum_fail.gw index 5943bf3a..9200361f 100644 --- a/tests/plug/enum_fail.gw +++ b/tests/plug/enum_fail.gw @@ -1,2 +1,2 @@ -#import enum_fail +import enum_fail; <<< __file__ >>>; diff --git a/tests/plug/enum_fail2.gw b/tests/plug/enum_fail2.gw index 622052f5..a03da3c0 100644 --- a/tests/plug/enum_fail2.gw +++ b/tests/plug/enum_fail2.gw @@ -1,2 +1,2 @@ -#import enum_fail2 +import enum_fail2; <<< __file__ >>>; diff --git a/tests/plug/enum_fail3.gw b/tests/plug/enum_fail3.gw index 9466decc..c73ead82 100644 --- a/tests/plug/enum_fail3.gw +++ b/tests/plug/enum_fail3.gw @@ -1,2 +1,2 @@ -#import enum_fail3 +import enum_fail3; <<< __file__ >>>; diff --git a/tests/plug/extend_array.gw b/tests/plug/extend_array.gw index 5e9747e5..db80e3ee 100644 --- a/tests/plug/extend_array.gw +++ b/tests/plug/extend_array.gw @@ -1,4 +1,4 @@ -#import extend_array +import extend_array; var ArrayExt a; <<< a >>>; <<< a.size() >>>; diff --git a/tests/plug/fail_on_next_arg.gw b/tests/plug/fail_on_next_arg.gw index efe07cd0..45455ce8 100644 --- a/tests/plug/fail_on_next_arg.gw +++ b/tests/plug/fail_on_next_arg.gw @@ -1,2 +1,2 @@ -#import fail_on_next_arg +import fail_on_next_arg; <<< __file__ >>>; diff --git a/tests/plug/fail_on_next_arg2.gw b/tests/plug/fail_on_next_arg2.gw index 61f54de9..fdcf9d89 100644 --- a/tests/plug/fail_on_next_arg2.gw +++ b/tests/plug/fail_on_next_arg2.gw @@ -1,2 +1,2 @@ -#import fail_on_next_arg2 +import fail_on_next_arg2; <<< __file__ >>>; diff --git a/tests/plug/fptr.gw b/tests/plug/fptr.gw index ae1732d5..ed6d3d58 100644 --- a/tests/plug/fptr.gw +++ b/tests/plug/fptr.gw @@ -1,4 +1,4 @@ -#import fptr +import fptr; fun void test(){ <<< "test" >>>; } var PtrType ptr; test(); diff --git a/tests/plug/fptr_tmpl.gw b/tests/plug/fptr_tmpl.gw index e000218b..1dae1fd1 100644 --- a/tests/plug/fptr_tmpl.gw +++ b/tests/plug/fptr_tmpl.gw @@ -1,2 +1,2 @@ -#import fptr_tmpl +import fptr_tmpl; <<< __file__ >>>; diff --git a/tests/plug/fptr_tmpl_fail.gw b/tests/plug/fptr_tmpl_fail.gw index ac0e0d54..f0897aac 100644 --- a/tests/plug/fptr_tmpl_fail.gw +++ b/tests/plug/fptr_tmpl_fail.gw @@ -1,2 +1,2 @@ -#import fptr_tmpl_fail +import fptr_tmpl_fail; <<< __file__ >>>; diff --git a/tests/plug/func_fail.gw b/tests/plug/func_fail.gw index 69a957a2..9dfe266b 100644 --- a/tests/plug/func_fail.gw +++ b/tests/plug/func_fail.gw @@ -1,2 +1,2 @@ -#import func_fail +import func_fail; <<< __file__ >>>; diff --git a/tests/plug/func_fail2.gw b/tests/plug/func_fail2.gw index 317de91f..78eb54c2 100644 --- a/tests/plug/func_fail2.gw +++ b/tests/plug/func_fail2.gw @@ -1,2 +1,2 @@ -#import func_fail2 +import func_fail2; <<< __file__ >>>; diff --git a/tests/plug/func_fail3.gw b/tests/plug/func_fail3.gw index e0928a3f..eb202e0b 100644 --- a/tests/plug/func_fail3.gw +++ b/tests/plug/func_fail3.gw @@ -1,2 +1,2 @@ -#import func_fail3 +import func_fail3; <<< __file__ >>>; diff --git a/tests/plug/func_fail4.gw b/tests/plug/func_fail4.gw index 73c50c0d..f6f18d56 100644 --- a/tests/plug/func_fail4.gw +++ b/tests/plug/func_fail4.gw @@ -1,2 +1,2 @@ -#import func_fail4 +import func_fail4; <<< __file__ >>>; diff --git a/tests/plug/func_subscript_not_empty.gw b/tests/plug/func_subscript_not_empty.gw index 2fb66a10..2ca8853c 100644 --- a/tests/plug/func_subscript_not_empty.gw +++ b/tests/plug/func_subscript_not_empty.gw @@ -1,2 +1,2 @@ -#import func_subscript_not_empty +import func_subscript_not_empty; <<< __file__ >>>; diff --git a/tests/plug/func_tmpl.gw b/tests/plug/func_tmpl.gw index 124ab9c4..8a04d75a 100644 --- a/tests/plug/func_tmpl.gw +++ b/tests/plug/func_tmpl.gw @@ -1,3 +1,3 @@ -#import func_tmpl +import func_tmpl; test:[int](1); test(1); diff --git a/tests/plug/func_tmpl_fail.gw b/tests/plug/func_tmpl_fail.gw index 0d320bf8..c5dbc25b 100644 --- a/tests/plug/func_tmpl_fail.gw +++ b/tests/plug/func_tmpl_fail.gw @@ -1,2 +1,2 @@ -#import func_tmpl_fail +import func_tmpl_fail; <<< __file__ >>>; diff --git a/tests/plug/func_too_many_arg.gw b/tests/plug/func_too_many_arg.gw index 740ffe61..25023a4d 100644 --- a/tests/plug/func_too_many_arg.gw +++ b/tests/plug/func_too_many_arg.gw @@ -1,2 +1,2 @@ -#import func_too_many_arg +import func_too_many_arg; <<< __file__ >>>; diff --git a/tests/plug/global_func.gw b/tests/plug/global_func.gw index bd590e86..390662da 100644 --- a/tests/plug/global_func.gw +++ b/tests/plug/global_func.gw @@ -1,3 +1,3 @@ -#import global_func +import global_func; <<< test >>>; <<< 1 => test >>>; diff --git a/tests/plug/global_var.gw b/tests/plug/global_var.gw index e03e005d..7475578f 100644 --- a/tests/plug/global_var.gw +++ b/tests/plug/global_var.gw @@ -1,4 +1,4 @@ -#import global_var +import global_var; <<< i >>>; <<< "other test" :=> i >>>; <<< 12 :=> f >>>; diff --git a/tests/plug/invalid_arg.gw b/tests/plug/invalid_arg.gw index eaaff14a..c6661bd5 100644 --- a/tests/plug/invalid_arg.gw +++ b/tests/plug/invalid_arg.gw @@ -1,2 +1,2 @@ -#import invalid_arg +import invalid_arg; <<< __file__ >>>; diff --git a/tests/plug/invalid_array.gw b/tests/plug/invalid_array.gw index ed0ff7a4..27bd9f1c 100644 --- a/tests/plug/invalid_array.gw +++ b/tests/plug/invalid_array.gw @@ -1,2 +1,2 @@ -#import invalid_array +import invalid_array; <<< __file__ >>>; diff --git a/tests/plug/invalid_func.gw b/tests/plug/invalid_func.gw index 1d4b257a..ecbc4022 100644 --- a/tests/plug/invalid_func.gw +++ b/tests/plug/invalid_func.gw @@ -1,2 +1,2 @@ -#import invalid_func +import invalid_func; <<< __file__ >>>; diff --git a/tests/plug/invalid_names.gw b/tests/plug/invalid_names.gw index f2ce7c23..b00ef671 100644 --- a/tests/plug/invalid_names.gw +++ b/tests/plug/invalid_names.gw @@ -1,2 +1,2 @@ -#import invalid_names +import invalid_names; <<< __file__ >>>; diff --git a/tests/plug/invalid_names0.gw b/tests/plug/invalid_names0.gw index f0633287..a1f49465 100644 --- a/tests/plug/invalid_names0.gw +++ b/tests/plug/invalid_names0.gw @@ -1,2 +1,2 @@ -#import invalid_names0 +import invalid_names0; <<< __file__ >>>; diff --git a/tests/plug/invalid_names1.gw b/tests/plug/invalid_names1.gw index d5fb5ca2..367aeec5 100644 --- a/tests/plug/invalid_names1.gw +++ b/tests/plug/invalid_names1.gw @@ -1,2 +1,2 @@ -#import invalid_names1 +import invalid_names1; <<< __file__ >>>; diff --git a/tests/plug/invalid_names2.gw b/tests/plug/invalid_names2.gw index d26dc648..b1e97800 100644 --- a/tests/plug/invalid_names2.gw +++ b/tests/plug/invalid_names2.gw @@ -1,2 +1,2 @@ -#import invalid_names2 +import invalid_names2; <<< __file__ >>>; diff --git a/tests/plug/invalid_names3.gw b/tests/plug/invalid_names3.gw index 16832a86..5fe2c93f 100644 --- a/tests/plug/invalid_names3.gw +++ b/tests/plug/invalid_names3.gw @@ -1,2 +1,2 @@ -#import invalid_names3 +import invalid_names3; <<< __file__ >>>; diff --git a/tests/plug/invalid_type1.gw b/tests/plug/invalid_type1.gw index 31b70266..0db70402 100644 --- a/tests/plug/invalid_type1.gw +++ b/tests/plug/invalid_type1.gw @@ -1,2 +1,2 @@ -#import invalid_type1 +import invalid_type1; <<< __file__ >>>; diff --git a/tests/plug/invalid_type2.gw b/tests/plug/invalid_type2.gw index c0cb84ad..67bcc254 100644 --- a/tests/plug/invalid_type2.gw +++ b/tests/plug/invalid_type2.gw @@ -1,2 +1,2 @@ -#import invalid_type2 +import invalid_type2; <<< __file__ >>>; diff --git a/tests/plug/invalid_type3.gw b/tests/plug/invalid_type3.gw index e735ba71..7e85000d 100644 --- a/tests/plug/invalid_type3.gw +++ b/tests/plug/invalid_type3.gw @@ -1,2 +1,2 @@ -#import invalid_type3 +import invalid_type3; <<< __file__ >>>; diff --git a/tests/plug/mk_type_array.gw b/tests/plug/mk_type_array.gw index ce617bb5..a8bc5274 100644 --- a/tests/plug/mk_type_array.gw +++ b/tests/plug/mk_type_array.gw @@ -1,2 +1,2 @@ -#import mk_type_array +import mk_type_array; <<< __file__ >>>; diff --git a/tests/plug/no_import.gw b/tests/plug/no_import.gw index ec6d8146..4cb23edf 100644 --- a/tests/plug/no_import.gw +++ b/tests/plug/no_import.gw @@ -1,2 +1,2 @@ -#import no_import +import no_import; <<< __file__ >>>; diff --git a/tests/plug/not_importing.gw b/tests/plug/not_importing.gw index 9882c422..e639f555 100644 --- a/tests/plug/not_importing.gw +++ b/tests/plug/not_importing.gw @@ -1,2 +1,2 @@ -#import not_importing +import not_importing; <<< __file__ >>>; diff --git a/tests/plug/pass.gw b/tests/plug/pass.gw index 288427a7..7ebaf8bb 100644 --- a/tests/plug/pass.gw +++ b/tests/plug/pass.gw @@ -1,2 +1,2 @@ -#import pass +import pass; <<< __file__ >>>; diff --git a/tests/plug/specialid_emit.gw b/tests/plug/specialid_emit.gw index 229d6a40..57866aa5 100644 --- a/tests/plug/specialid_emit.gw +++ b/tests/plug/specialid_emit.gw @@ -1,2 +1,2 @@ -#import specialid_emit +import specialid_emit; <<< testid >>>; diff --git a/tests/plug/static_string.gw b/tests/plug/static_string.gw index a6d93b7f..c93e6b03 100644 --- a/tests/plug/static_string.gw +++ b/tests/plug/static_string.gw @@ -1,3 +1,3 @@ -#import static_string +import static_string; #!<<< StaticString.self >>>; <<< self >>>; diff --git a/tests/plug/str2decl.gw b/tests/plug/str2decl.gw index 59b5fe35..6dad2b72 100644 --- a/tests/plug/str2decl.gw +++ b/tests/plug/str2decl.gw @@ -1,2 +1,2 @@ -#import str2td +import str2td; <<< __file__ >>>; diff --git a/tests/plug/str2list_fail.gw b/tests/plug/str2list_fail.gw index 119f88ab..aff6f3df 100644 --- a/tests/plug/str2list_fail.gw +++ b/tests/plug/str2list_fail.gw @@ -1,2 +1,2 @@ -#import str2list_fail +import str2list_fail; <<< __file__ >>>; diff --git a/tests/plug/struct.gw b/tests/plug/struct.gw index 48f72512..016f3920 100644 --- a/tests/plug/struct.gw +++ b/tests/plug/struct.gw @@ -1,4 +1,4 @@ -#import struct +import struct; <<< var float f >>>; var Struct c; diff --git a/tests/plug/template_arg.gw b/tests/plug/template_arg.gw index 87a93362..55368a4a 100644 --- a/tests/plug/template_arg.gw +++ b/tests/plug/template_arg.gw @@ -1,2 +1,2 @@ -#import template_arg +import template_arg; <<< __file__ >>>; diff --git a/tests/plug/trig.gw b/tests/plug/trig.gw index 4cce8a09..2e080e40 100644 --- a/tests/plug/trig.gw +++ b/tests/plug/trig.gw @@ -1,4 +1,4 @@ -#import trig +import trig; var Trig trig => dac; adc :=> trig; adc :=< trig; diff --git a/tests/plug/typedef.gw b/tests/plug/typedef.gw index f4e2a020..b752e963 100644 --- a/tests/plug/typedef.gw +++ b/tests/plug/typedef.gw @@ -1,4 +1,4 @@ -#import typedef +import typedef; var Typedef t; #!fun int test(int i) { <<< i >>>; } #!test :=> t; diff --git a/tests/plug/typedef_fail.gw b/tests/plug/typedef_fail.gw index bff45f17..4a6d5163 100644 --- a/tests/plug/typedef_fail.gw +++ b/tests/plug/typedef_fail.gw @@ -1,2 +1,2 @@ -#import typedef_fail +import typedef_fail; <<< __file__ >>>; diff --git a/tests/plug/typedef_tmpl.gw b/tests/plug/typedef_tmpl.gw index 42c584c5..350467d1 100644 --- a/tests/plug/typedef_tmpl.gw +++ b/tests/plug/typedef_tmpl.gw @@ -1,2 +1,2 @@ -#import typedef_tmpl +import typedef_tmpl; <<< __file__ >>>; diff --git a/tests/plug/ugen_connect.gw b/tests/plug/ugen_connect.gw index 1ef7f36a..4403c85b 100644 --- a/tests/plug/ugen_connect.gw +++ b/tests/plug/ugen_connect.gw @@ -1,2 +1,2 @@ -#import ugen_connect +import ugen_connect; <<< __file__ >>>; diff --git a/tests/plug/union.gw b/tests/plug/union.gw index 27568187..e93a8fd9 100644 --- a/tests/plug/union.gw +++ b/tests/plug/union.gw @@ -1,4 +1,4 @@ -#import union +import union; var Union u; <<< u.i >>>; <<< 12 :=> u.f >>>; diff --git a/tests/plug/union_fail_exp.gw b/tests/plug/union_fail_exp.gw index 88f7810e..6d2d2069 100644 --- a/tests/plug/union_fail_exp.gw +++ b/tests/plug/union_fail_exp.gw @@ -1,2 +1,2 @@ -#import union_fail_exp +import union_fail_exp; <<< __file__ >>>; diff --git a/tests/plug/union_member.gw b/tests/plug/union_member.gw index a5cbcf4b..ee3f8928 100644 --- a/tests/plug/union_member.gw +++ b/tests/plug/union_member.gw @@ -1,2 +1,2 @@ -#import union_member +import union_member; <<< __file__ >>>; diff --git a/tests/plug/union_name.gw b/tests/plug/union_name.gw index 58730694..b311d05a 100644 --- a/tests/plug/union_name.gw +++ b/tests/plug/union_name.gw @@ -1,3 +1,3 @@ -#import union_name +import union_name; <<< my_union >>>; <<>>; diff --git a/tests/plug/union_tmpl.gw b/tests/plug/union_tmpl.gw index 433f177c..e9e13a65 100644 --- a/tests/plug/union_tmpl.gw +++ b/tests/plug/union_tmpl.gw @@ -1,3 +1,3 @@ -#import union_tmpl +import union_tmpl; <<< var U:[Event] u>>>; <<< u.a >>>; diff --git a/tests/plug/union_tmpl_fail.gw b/tests/plug/union_tmpl_fail.gw index b499f12f..18914740 100644 --- a/tests/plug/union_tmpl_fail.gw +++ b/tests/plug/union_tmpl_fail.gw @@ -1,2 +1,2 @@ -#import union_tmpl_fail +import union_tmpl_fail; <<< __file__ >>>; diff --git a/tests/plug/union_tmpl_fail2.gw b/tests/plug/union_tmpl_fail2.gw index ac613c34..d9207249 100644 --- a/tests/plug/union_tmpl_fail2.gw +++ b/tests/plug/union_tmpl_fail2.gw @@ -1,2 +1,2 @@ -#import union_tmpl_fail2 +import union_tmpl_fail2; <<< __file__ >>>; diff --git a/tests/plug/union_tmpl_fail3.gw b/tests/plug/union_tmpl_fail3.gw index 28903bec..a21db94c 100644 --- a/tests/plug/union_tmpl_fail3.gw +++ b/tests/plug/union_tmpl_fail3.gw @@ -1,2 +1,2 @@ -#import union_tmpl_fail3 +import union_tmpl_fail3; <<< __file__ >>>; diff --git a/tests/plug/vm_remove.gw b/tests/plug/vm_remove.gw index 3f455351..dcc9b262 100644 --- a/tests/plug/vm_remove.gw +++ b/tests/plug/vm_remove.gw @@ -1,3 +1,3 @@ -#import vm_remove +import vm_remove; test(12); test(1);