if(!i || s[i+1] != '>')
break;
c[i] = '\0';
- ck->list = new_id_list(gwion->mp, insert_symbol(gwion->st, c), ck->pos);
+ ck->list = new_id_list(gwion->mp, insert_symbol(gwion->st, c),
+ loc_cpy(gwion->mp, ck->pos));
return GW_OK;
}
if(s[i] == ',') {
if(!i)break;
c[i] = '\0';
- ck->list = new_id_list(gwion->mp, insert_symbol(gwion->st, c), ck->pos);
+ ck->list = new_id_list(gwion->mp, insert_symbol(gwion->st, c),
+ loc_cpy(gwion->mp, ck->pos));
struct tmpl_checker _ck = { .str=ck->str + i + 1, .pos=ck->pos };
CHECK_BB(tmpl_list(gwion, &_ck))
ck->list->next = _ck.list;
}
ANN Type gwi_fptr_end(const Gwi gwi, const ae_flag flag) {
- const Fptr_Def fptr = import_fptr(gwi, &gwi->func, flag);
+ DECL_OO(const Fptr_Def, fptr, = import_fptr(gwi, &gwi->func, flag))
const m_bool ret = traverse_fptr_def(gwi->gwion->env, fptr);
if(ret > 0)
SET_FLAG(fptr->base->func, builtin);
#include "operator.h"
#include "import.h"
-static MFUN(test_func) { puts("test"); }
GWION_IMPORT(typedef_test) {
- Type t_func_typedef;
- GWI_OB((t_func_typedef = gwi_mk_type(gwi, "FuncTypedef", SZ_INT , NULL)))
- GWI_BB(gwi_fptr_ini(gwi, "int", "<~A.~>test"))
+ GWI_BB(gwi_fptr_ini(gwi, "int~", "<~A~>test"))
GWI_OB(gwi_fptr_end(gwi, 0))
return GW_OK;
}
--- /dev/null
+#include "gwion_util.h"
+#include "gwion_ast.h"
+#include "oo.h"
+#include "vm.h"
+#include "env.h"
+#include "type.h"
+#include "instr.h"
+#include "object.h"
+#include "gwion.h"
+#include "value.h"
+#include "operator.h"
+#include "import.h"
+#include "instr.h"
+
+static SFUN(func_tmpl_xfun) {
+
+}
+
+GWION_IMPORT(func_tmpl) {
+ GWI_BB(gwi_func_ini(gwi, "voit", "<~A~>test", func_tmpl_xfun))
+ GWI_BB(gwi_func_end(gwi, 0))
+ return GW_OK;
+}