From 76514d765495993bec7cff08b1d807eac8071c2e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 23 Apr 2021 18:00:24 +0200 Subject: [PATCH] :art: Rename funcdef to funptr --- ast | 2 +- examples/class_func_pointer.gw | 4 ++-- examples/func_pointer.gw | 2 +- examples/func_ptr.gw | 2 +- examples/implicit_fptr.gw | 2 +- examples/implicit_fptr_class.gw | 4 ++-- examples/implicit_fptr_tmpl.gw | 2 +- examples/ptr_assign_class.gw | 2 +- plug | 2 +- src/parse/operator.c | 1 - tests/decay_op/op.gw | 2 +- tests/effects/try.gw | 12 ++++++++++++ tests/error/fptr_call_decl.gw | 2 +- tests/error/fptr_other_class.gw | 4 ++-- tests/error/lambda_mismatch2.gw | 2 +- tests/error/lambda_mismatch3.gw | 2 +- tests/error/pointer_outside_class.gw | 2 +- tests/error/pointer_unknown.gw | 2 +- tests/error/pointer_unknown_arg.gw | 2 +- tests/error/ptr_arg_0_size.gw | 2 +- tests/error/ptr_arg_array.gw | 2 +- tests/error/ptr_assign_global.gw | 2 +- tests/error/ptr_assign_member.gw | 2 +- tests/error/ptr_assign_other.gw | 2 +- tests/error/ptr_defined.gw | 2 +- tests/error/ptr_no_match.gw | 2 +- tests/error/ptr_static_outside.gw | 2 +- tests/error/ptr_static_outside2.gw | 2 +- tests/error/typedef_func_tmpl_types.gw | 2 +- tests/error/typedef_func_tmpl_types2.gw | 2 +- tests/fptr/class_ptr01.gw | 2 +- tests/fptr/class_ptr1.gw | 2 +- tests/fptr/class_ptr2.gw | 2 +- tests/fptr/class_ptr3.gw | 2 +- tests/fptr/class_ptr31.gw | 2 +- tests/fptr/fptr_class_type.gw | 2 +- tests/fptr/fptr_global0.gw | 2 +- tests/fptr/fptr_tmpl_cast.gw | 2 +- tests/new/class_fptr_returns_fptr.gw | 4 ++-- tests/new/implicit_fptr.gw | 2 +- tests/new/lambda.gw | 2 +- tests/new/lambda2.gw | 2 +- tests/new/spork_fptr.gw | 4 ++-- tests/new/spork_fptr2.gw | 2 +- tests/new/test.gw | 2 +- tests/new/test2.gw | 2 +- tests/new/typedef_func_class.gw | 2 +- tests/new/typedef_func_class_variadic.gw | 2 +- tests/new/typedef_func_tmpl_class.gw | 2 +- tests/new/typedef_func_tmpl_class_static.gw | 2 +- tests/new/typedef_func_tmpl_err.gw | 2 +- tests/new/typedef_func_tmpl_tmpl.gw | 2 +- tests/tree/assign_member_ptr.gw | 2 +- tests/tree/fptr_call_decl.gw | 2 +- tests/tree/fptr_class.gw | 2 +- tests/tree/fptr_global0.gw | 2 +- tests/tree/fptr_other_class.gw | 4 ++-- tests/tree/func_ptr_array.gw | 2 +- tests/tree/ptr_arg_array.gw | 2 +- tests/tree/ptr_decl_assign.gw | 2 +- tests/tree/ptr_test.gw | 2 +- tests/tree/static_data_test.gw | 2 +- tests/tree/template_fptr.gw | 2 +- tests/tree/typedef_func.gw | 2 +- tests/tree/typedef_func_class.gw | 2 +- tests/tree/typedef_func_tmpl.gw | 2 +- tests/tree/typedef_func_tmpl2.gw | 2 +- tests/tree/typedef_func_tmpl_class.gw | 2 +- 68 files changed, 84 insertions(+), 73 deletions(-) create mode 100644 tests/effects/try.gw diff --git a/ast b/ast index 039b3761..03ba6e84 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 039b37610ecc8f3ed162e6a9f7a20b1612109dea +Subproject commit 03ba6e84913b026d77a02152010a08850aa93f3e diff --git a/examples/class_func_pointer.gw b/examples/class_func_pointer.gw index edf6bdc3..c97ff2c4 100644 --- a/examples/class_func_pointer.gw +++ b/examples/class_func_pointer.gw @@ -1,7 +1,7 @@ fun void test() { <<< "member function." >>>; } class C { - funcdef void func_t(); -#! funcdef static void s_func_t(); + funptr void func_t(); +#! funptr static void s_func_t(); var func_t func_p; #! static fun c_t s_func_p; #! static s_func_t s_ptr; diff --git a/examples/func_pointer.gw b/examples/func_pointer.gw index 28fa4df5..13e538ed 100644 --- a/examples/func_pointer.gw +++ b/examples/func_pointer.gw @@ -1,4 +1,4 @@ -funcdef void func_t(); +funptr void func_t(); var func_t func_p; fun void test1() { <<< "test1" >>>; } fun void test2() { <<< "test2" >>>; } diff --git a/examples/func_ptr.gw b/examples/func_ptr.gw index d83e9380..9c85b25d 100644 --- a/examples/func_ptr.gw +++ b/examples/func_ptr.gw @@ -1,5 +1,5 @@ #! define a fun pointer type -funcdef void Test(); +funptr void Test(); #! define a few funs fun void test1(){ <<< "test" >>>; }; diff --git a/examples/implicit_fptr.gw b/examples/implicit_fptr.gw index ba34620d..d1f2c483 100644 --- a/examples/implicit_fptr.gw +++ b/examples/implicit_fptr.gw @@ -1,4 +1,4 @@ -funcdef void t_ptr(); +funptr void t_ptr(); fun void test(t_ptr p) { <<< p >>>; } diff --git a/examples/implicit_fptr_class.gw b/examples/implicit_fptr_class.gw index f9758699..f7020dae 100644 --- a/examples/implicit_fptr_class.gw +++ b/examples/implicit_fptr_class.gw @@ -1,6 +1,6 @@ class C { - funcdef void t_ptr(); - funcdef void t_ptr1(int); + funptr void t_ptr(); + funptr void t_ptr1(int); fun void test(t_ptr p) { <<< p >>>; } diff --git a/examples/implicit_fptr_tmpl.gw b/examples/implicit_fptr_tmpl.gw index 65239057..9626f1f6 100644 --- a/examples/implicit_fptr_tmpl.gw +++ b/examples/implicit_fptr_tmpl.gw @@ -1,4 +1,4 @@ -funcdef void t_ptr:[A](); +funptr void t_ptr:[A](); fun void test(t_ptr p) { <<< p >>>; } diff --git a/examples/ptr_assign_class.gw b/examples/ptr_assign_class.gw index 9b73e8a5..7e4c44bb 100644 --- a/examples/ptr_assign_class.gw +++ b/examples/ptr_assign_class.gw @@ -1,5 +1,5 @@ class C { - funcdef void Test(); + funptr void Test(); fun void test1(){}; var Test test0; <<< test1 @=> test0 >>>; diff --git a/plug b/plug index 88fdb929..aaf3e8ee 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit 88fdb929584524f29d8eeb23b0fc7afd80fd57ee +Subproject commit aaf3e8eea9c665f609d98a573cfa9b442f1f6eb7 diff --git a/src/parse/operator.c b/src/parse/operator.c index 98474c85..a42b4e1b 100644 --- a/src/parse/operator.c +++ b/src/parse/operator.c @@ -19,7 +19,6 @@ typedef struct M_Operator_{ Func func; opck ck; opem em; - m_uint emit_var; } M_Operator; ANN void free_op_map(Map map, struct Gwion_ *gwion) { diff --git a/tests/decay_op/op.gw b/tests/decay_op/op.gw index 3f039f0a..11cc79c5 100644 --- a/tests/decay_op/op.gw +++ b/tests/decay_op/op.gw @@ -1,4 +1,4 @@ -funcdef int test_t(int, int); +funptr int test_t(int, int); fun void test(test_t t) { <<>>; } diff --git a/tests/effects/try.gw b/tests/effects/try.gw new file mode 100644 index 00000000..59a028e0 --- /dev/null +++ b/tests/effects/try.gw @@ -0,0 +1,12 @@ +0 => var auto i; + +try { #! it will resume here + <<< "value of i ${i}" >>>; + 1/i; #! will perform ZeroDiveException on first try +} handle ZeroDivideException { + <<< "set i to ${ 42 => i } and resume" >>>; + retry; +} +<<< "value of i at the end ${i}" >>>; + +#!perform Something; diff --git a/tests/error/fptr_call_decl.gw b/tests/error/fptr_call_decl.gw index 9b66787c..51f90bb0 100644 --- a/tests/error/fptr_call_decl.gw +++ b/tests/error/fptr_call_decl.gw @@ -1,3 +1,3 @@ #! [contains] Can't call late function pointer at declaration site -funcdef void test(int); +funptr void test(int); (var test t)(2); diff --git a/tests/error/fptr_other_class.gw b/tests/error/fptr_other_class.gw index 88fa3e00..e00dc1b4 100644 --- a/tests/error/fptr_other_class.gw +++ b/tests/error/fptr_other_class.gw @@ -1,8 +1,8 @@ #! [contains] can't use non global fptr of other class class C { - funcdef void t_ptr(); + funptr void t_ptr(); } class D { - funcdef void t_ptr(); + funptr void t_ptr(); var C.t_ptr ptr; } diff --git a/tests/error/lambda_mismatch2.gw b/tests/error/lambda_mismatch2.gw index 2c5acab3..5295561f 100644 --- a/tests/error/lambda_mismatch2.gw +++ b/tests/error/lambda_mismatch2.gw @@ -1,4 +1,4 @@ #! [contains] argument number does not match for lambda -funcdef void ptr_t(int i); +funptr void ptr_t(int i); \a b { <<< a, " ", b >>>; } @=> var ptr_t ptr; ptr(2); diff --git a/tests/error/lambda_mismatch3.gw b/tests/error/lambda_mismatch3.gw index e2338728..cabf0b0b 100644 --- a/tests/error/lambda_mismatch3.gw +++ b/tests/error/lambda_mismatch3.gw @@ -1,5 +1,5 @@ #! [contains] argument number does not match for lambda -funcdef void ptr_t(int i); +funptr void ptr_t(int i); \a b { <<< a, " ", b >>>; } @=> var ptr_t ptr; fun void test(ptr_t p) { p(2); diff --git a/tests/error/pointer_outside_class.gw b/tests/error/pointer_outside_class.gw index 747aefe7..c92aab32 100644 --- a/tests/error/pointer_outside_class.gw +++ b/tests/error/pointer_outside_class.gw @@ -1,2 +1,2 @@ #! [contains] can only be used at class scope -funcdef static void my_fun(); +funptr static void my_fun(); diff --git a/tests/error/pointer_unknown.gw b/tests/error/pointer_unknown.gw index 69c23bc0..c5e1f9f8 100644 --- a/tests/error/pointer_unknown.gw +++ b/tests/error/pointer_unknown.gw @@ -1,2 +1,2 @@ #! [contains] unknown type -funcdef unknown_type my_fun(); +funptr unknown_type my_fun(); diff --git a/tests/error/pointer_unknown_arg.gw b/tests/error/pointer_unknown_arg.gw index dfa955fe..2e089f59 100644 --- a/tests/error/pointer_unknown_arg.gw +++ b/tests/error/pointer_unknown_arg.gw @@ -1,2 +1,2 @@ #! [contains] unknown type -funcdef void my_func(unknown_type type); +funptr void my_func(unknown_type type); diff --git a/tests/error/ptr_arg_0_size.gw b/tests/error/ptr_arg_0_size.gw index 63e4879e..b8b19f04 100644 --- a/tests/error/ptr_arg_0_size.gw +++ b/tests/error/ptr_arg_0_size.gw @@ -1,2 +1,2 @@ #! [contains] cannot declare variables of size '0' -funcdef void my_func(void arg); +funptr void my_func(void arg); diff --git a/tests/error/ptr_arg_array.gw b/tests/error/ptr_arg_array.gw index 82ccabb3..ad60abbf 100644 --- a/tests/error/ptr_arg_array.gw +++ b/tests/error/ptr_arg_array.gw @@ -1,2 +1,2 @@ #! [contains] must be defined with empty -funcdef void my_func (int i[4]); +funptr void my_func (int i[4]); diff --git a/tests/error/ptr_assign_global.gw b/tests/error/ptr_assign_global.gw index cd07de6d..f40b10c7 100644 --- a/tests/error/ptr_assign_global.gw +++ b/tests/error/ptr_assign_global.gw @@ -1,6 +1,6 @@ #! [contains] can't assign non member function to member function pointer class C { - funcdef void Test(); + funptr void Test(); var Test test; } diff --git a/tests/error/ptr_assign_member.gw b/tests/error/ptr_assign_member.gw index 086f15a6..1a3d9f5d 100644 --- a/tests/error/ptr_assign_member.gw +++ b/tests/error/ptr_assign_member.gw @@ -1,5 +1,5 @@ #! [contains] can't assign member function to non member function pointer -funcdef void Test(); +funptr void Test(); var Test test; class D { fun void test(){} diff --git a/tests/error/ptr_assign_other.gw b/tests/error/ptr_assign_other.gw index a885a93d..44f841cf 100644 --- a/tests/error/ptr_assign_other.gw +++ b/tests/error/ptr_assign_other.gw @@ -1,6 +1,6 @@ #! [contains] can't assign member function to a pointer of an other class class C { - funcdef void Test(); + funptr void Test(); var Test test; } diff --git a/tests/error/ptr_defined.gw b/tests/error/ptr_defined.gw index 597ba331..3bb84643 100644 --- a/tests/error/ptr_defined.gw +++ b/tests/error/ptr_defined.gw @@ -1,3 +1,3 @@ #! [contains] has already been defined in the same scope var int i; -funcdef void i(); +funptr void i(); diff --git a/tests/error/ptr_no_match.gw b/tests/error/ptr_no_match.gw index 0f9da72d..f77ed4fc 100644 --- a/tests/error/ptr_no_match.gw +++ b/tests/error/ptr_no_match.gw @@ -2,6 +2,6 @@ fun void test(int i){} fun void test(float f){} -funcdef void Test(); +funptr void Test(); var Test t; test @=> t; diff --git a/tests/error/ptr_static_outside.gw b/tests/error/ptr_static_outside.gw index 8b2cc591..d98c6695 100644 --- a/tests/error/ptr_static_outside.gw +++ b/tests/error/ptr_static_outside.gw @@ -1,2 +1,2 @@ #! [contains] can only be used at class scope -funcdef static void Test(); +funptr static void Test(); diff --git a/tests/error/ptr_static_outside2.gw b/tests/error/ptr_static_outside2.gw index 27098316..1cd96682 100644 --- a/tests/error/ptr_static_outside2.gw +++ b/tests/error/ptr_static_outside2.gw @@ -1,2 +1,2 @@ #! [contains] can only be used at class scope -funcdef static void Test(int i); +funptr static void Test(int i); diff --git a/tests/error/typedef_func_tmpl_types.gw b/tests/error/typedef_func_tmpl_types.gw index bda30be4..d94e552a 100644 --- a/tests/error/typedef_func_tmpl_types.gw +++ b/tests/error/typedef_func_tmpl_types.gw @@ -1,5 +1,5 @@ #! [contains] pre-defined types -funcdef void t_ptr:[A](); +funptr void t_ptr:[A](); var t_ptr:[int] iptr; diff --git a/tests/error/typedef_func_tmpl_types2.gw b/tests/error/typedef_func_tmpl_types2.gw index 3313edb5..713d2f32 100644 --- a/tests/error/typedef_func_tmpl_types2.gw +++ b/tests/error/typedef_func_tmpl_types2.gw @@ -1,5 +1,5 @@ #! [contains] pre-defined types -funcdef void t_ptr:[A](); +funptr void t_ptr:[A](); typedef t_ptr:[int] B; fun void test:[A]() { diff --git a/tests/fptr/class_ptr01.gw b/tests/fptr/class_ptr01.gw index 49818889..529fee98 100644 --- a/tests/fptr/class_ptr01.gw +++ b/tests/fptr/class_ptr01.gw @@ -1,7 +1,7 @@ #! [contains] can't assign class C { fun static void test(int i) { <<< "int arg" >>>; } - funcdef void PtrType(int i); + funptr void PtrType(int i); test @=> var PtrType p; p(1); test @=> p; diff --git a/tests/fptr/class_ptr1.gw b/tests/fptr/class_ptr1.gw index a5e09108..5a3f1332 100644 --- a/tests/fptr/class_ptr1.gw +++ b/tests/fptr/class_ptr1.gw @@ -1,6 +1,6 @@ class C { fun void test(int i) { <<< "int arg" >>>; } - funcdef static void PtrType(int i); + funptr static void PtrType(int i); test @=> var PtrType p; p(1); diff --git a/tests/fptr/class_ptr2.gw b/tests/fptr/class_ptr2.gw index c5c5a289..4b707490 100644 --- a/tests/fptr/class_ptr2.gw +++ b/tests/fptr/class_ptr2.gw @@ -1,6 +1,6 @@ class C { fun void test(int i) { <<< "int arg" >>>; } - funcdef void PtrType(int i); + funptr void PtrType(int i); test @=> var static PtrType p; p(1); test @=> p; diff --git a/tests/fptr/class_ptr3.gw b/tests/fptr/class_ptr3.gw index ecbca6a9..68e9cf55 100644 --- a/tests/fptr/class_ptr3.gw +++ b/tests/fptr/class_ptr3.gw @@ -1,6 +1,6 @@ class C { fun static void test(int i) { <<< "int arg" >>>; } - funcdef static void PtrType(int i); + funptr static void PtrType(int i); test @=> var static PtrType p; p(1); test @=> p; diff --git a/tests/fptr/class_ptr31.gw b/tests/fptr/class_ptr31.gw index ce37103f..9a64442b 100644 --- a/tests/fptr/class_ptr31.gw +++ b/tests/fptr/class_ptr31.gw @@ -1,7 +1,7 @@ #! [contains] can't assign class C { fun void test(int i) { <<< "int arg" >>>; } - funcdef static void PtrType(int i); + funptr static void PtrType(int i); test @=> var static PtrType p; p(1); test @=> p; diff --git a/tests/fptr/fptr_class_type.gw b/tests/fptr/fptr_class_type.gw index 5c14dcac..754ff775 100644 --- a/tests/fptr/fptr_class_type.gw +++ b/tests/fptr/fptr_class_type.gw @@ -1,2 +1,2 @@ -funcdef void ptr_t(); +funptr void ptr_t(); var ptr_t t @=> var ptr_t t2; diff --git a/tests/fptr/fptr_global0.gw b/tests/fptr/fptr_global0.gw index 07222040..36c3ba78 100644 --- a/tests/fptr/fptr_global0.gw +++ b/tests/fptr/fptr_global0.gw @@ -1,3 +1,3 @@ class C { -funcdef global void global_fptr(int i); +funptr global void global_fptr(int i); } diff --git a/tests/fptr/fptr_tmpl_cast.gw b/tests/fptr/fptr_tmpl_cast.gw index 3ede83a1..fef6a82f 100644 --- a/tests/fptr/fptr_tmpl_cast.gw +++ b/tests/fptr/fptr_tmpl_cast.gw @@ -1,5 +1,5 @@ class C { - funcdef void ptr_t:[A](); + funptr void ptr_t:[A](); fun void test:[A]() {} test $ ptr_t; } diff --git a/tests/new/class_fptr_returns_fptr.gw b/tests/new/class_fptr_returns_fptr.gw index 5d00e07d..8f3d1b6b 100644 --- a/tests/new/class_fptr_returns_fptr.gw +++ b/tests/new/class_fptr_returns_fptr.gw @@ -1,7 +1,7 @@ class C { var int m_i; - funcdef void t_fptr0(); - funcdef void t_fptr1(int i); + funptr void t_fptr0(); + funptr void t_fptr1(int i); fun void test() { <<< this , " ", __func__ >>>;} fun void test(int i) { <<< __func__, " ", i >>>;} test @=> var t_fptr0 ptr0; diff --git a/tests/new/implicit_fptr.gw b/tests/new/implicit_fptr.gw index 3c85a766..b2c8aeef 100644 --- a/tests/new/implicit_fptr.gw +++ b/tests/new/implicit_fptr.gw @@ -1,5 +1,5 @@ class C { - funcdef void T(); + funptr void T(); fun int f(T t) { <<< t >>>; t();} fun void test() { <<< __func__ >>>; } test => f; diff --git a/tests/new/lambda.gw b/tests/new/lambda.gw index d3a3096a..b0d73c20 100644 --- a/tests/new/lambda.gw +++ b/tests/new/lambda.gw @@ -1,5 +1,5 @@ class C { - funcdef void ptr_t(int i,int j); + funptr void ptr_t(int i,int j); \a b { <<< this, " ", a, " ", b, " test" >>>; } @=> var ptr_t ptr; fun void test(int i, int j) { <<< this, " ", i, " ", j >>>; } } diff --git a/tests/new/lambda2.gw b/tests/new/lambda2.gw index 7726fbea..29e99f18 100644 --- a/tests/new/lambda2.gw +++ b/tests/new/lambda2.gw @@ -1,5 +1,5 @@ class C { - funcdef void ptr_t(int i); + funptr void ptr_t(int i); \a { <<< this, " ", a >>>; } @=> var ptr_t ptr; fun void t1(int i) { <<< this, " t1 ", i >>>; } fun void test(ptr_t p) { diff --git a/tests/new/spork_fptr.gw b/tests/new/spork_fptr.gw index 848e173a..c2690aaf 100644 --- a/tests/new/spork_fptr.gw +++ b/tests/new/spork_fptr.gw @@ -1,9 +1,9 @@ class C { - funcdef void t_fptr(int i); + funptr void t_fptr(int i); fun void test(int i) { <<< this , " ", __func__, " ", i >>>;} test @=> var t_fptr ptr; } -funcdef void t_fptr(int i); +funptr void t_fptr(int i); fun void test(int i) { <<< __func__, " ", i >>>;} test @=> var t_fptr ptr; <<< ptr >>>; diff --git a/tests/new/spork_fptr2.gw b/tests/new/spork_fptr2.gw index 2e5ef137..84dacb47 100644 --- a/tests/new/spork_fptr2.gw +++ b/tests/new/spork_fptr2.gw @@ -1,5 +1,5 @@ class C { - funcdef void t_fptr(int i, int); + funptr void t_fptr(int i, int); fun void test(int i, int j) { <<< this , " ", __func__, " ", i, " " , j >>>;} test @=> var t_fptr ptr; diff --git a/tests/new/test.gw b/tests/new/test.gw index 9040b4c0..27c37c0e 100644 --- a/tests/new/test.gw +++ b/tests/new/test.gw @@ -1,5 +1,5 @@ class C { - funcdef static void func_t:[A](A a); + funptr static void func_t:[A](A a); fun static void myfunc:[A](A a) { <<< a >>>; } myfunc @=> var static func_t ptr; ptr(1); diff --git a/tests/new/test2.gw b/tests/new/test2.gw index 4648f554..a4c174e4 100644 --- a/tests/new/test2.gw +++ b/tests/new/test2.gw @@ -1,5 +1,5 @@ class C:[A] { - funcdef static void func_t:[A](A a); + funptr static void func_t:[A](A a); fun static void myfunc:[A](A a) { <<< a >>>; } myfunc @=> var static func_t ptr; ptr(1); diff --git a/tests/new/typedef_func_class.gw b/tests/new/typedef_func_class.gw index f565ec3f..38c010ba 100644 --- a/tests/new/typedef_func_class.gw +++ b/tests/new/typedef_func_class.gw @@ -1,5 +1,5 @@ class C { - funcdef void t_ptr(); + funptr void t_ptr(); var t_ptr iptr; diff --git a/tests/new/typedef_func_class_variadic.gw b/tests/new/typedef_func_class_variadic.gw index 1cd72085..45fe1e88 100644 --- a/tests/new/typedef_func_class_variadic.gw +++ b/tests/new/typedef_func_class_variadic.gw @@ -1,5 +1,5 @@ class C { - funcdef void t_ptr(...); + funptr void t_ptr(...); var t_ptr iptr; diff --git a/tests/new/typedef_func_tmpl_class.gw b/tests/new/typedef_func_tmpl_class.gw index 2d4c8b6d..6d13f4b7 100644 --- a/tests/new/typedef_func_tmpl_class.gw +++ b/tests/new/typedef_func_tmpl_class.gw @@ -1,5 +1,5 @@ class C { - funcdef void t_ptr:[A](); + funptr void t_ptr:[A](); var t_ptr:[int] iptr; diff --git a/tests/new/typedef_func_tmpl_class_static.gw b/tests/new/typedef_func_tmpl_class_static.gw index ccc6d294..a5334948 100644 --- a/tests/new/typedef_func_tmpl_class_static.gw +++ b/tests/new/typedef_func_tmpl_class_static.gw @@ -1,5 +1,5 @@ class C { - funcdef static void t_ptr:[A](); + funptr static void t_ptr:[A](); var t_ptr:[int] iptr; diff --git a/tests/new/typedef_func_tmpl_err.gw b/tests/new/typedef_func_tmpl_err.gw index 41636664..05386ca7 100644 --- a/tests/new/typedef_func_tmpl_err.gw +++ b/tests/new/typedef_func_tmpl_err.gw @@ -1,4 +1,4 @@ -funcdef void t_ptr:[A](); +funptr void t_ptr:[A](); var t_ptr ptr; diff --git a/tests/new/typedef_func_tmpl_tmpl.gw b/tests/new/typedef_func_tmpl_tmpl.gw index 76988807..767be6d7 100644 --- a/tests/new/typedef_func_tmpl_tmpl.gw +++ b/tests/new/typedef_func_tmpl_tmpl.gw @@ -1,2 +1,2 @@ -funcdef void ptr_t:[A](myPtr ptr); +funptr void ptr_t:[A](myPtr ptr); var ptr_t:[ Ptr:[A] ] t; diff --git a/tests/tree/assign_member_ptr.gw b/tests/tree/assign_member_ptr.gw index 6d35aabb..f861434e 100644 --- a/tests/tree/assign_member_ptr.gw +++ b/tests/tree/assign_member_ptr.gw @@ -1,6 +1,6 @@ class C { - funcdef void Test(); + funptr void Test(); var Test test; fun void func(){} } diff --git a/tests/tree/fptr_call_decl.gw b/tests/tree/fptr_call_decl.gw index 4319fe7b..bae63466 100644 --- a/tests/tree/fptr_call_decl.gw +++ b/tests/tree/fptr_call_decl.gw @@ -1,2 +1,2 @@ -funcdef void test(int); +funptr void test(int); (var test t)(2); diff --git a/tests/tree/fptr_class.gw b/tests/tree/fptr_class.gw index c0144a56..711ac8d3 100644 --- a/tests/tree/fptr_class.gw +++ b/tests/tree/fptr_class.gw @@ -1,6 +1,6 @@ class C { fun void test(int i) { <<< "int arg" >>>; } - funcdef void ptr_t(int i); + funptr void ptr_t(int i); test @=> var ptr_t p; p(1); test @=> p; diff --git a/tests/tree/fptr_global0.gw b/tests/tree/fptr_global0.gw index ab49210e..8da913aa 100644 --- a/tests/tree/fptr_global0.gw +++ b/tests/tree/fptr_global0.gw @@ -1,3 +1,3 @@ class C { - funcdef global void global_fptr(int i); + funptr global void global_fptr(int i); } diff --git a/tests/tree/fptr_other_class.gw b/tests/tree/fptr_other_class.gw index 88fa3e00..e00dc1b4 100644 --- a/tests/tree/fptr_other_class.gw +++ b/tests/tree/fptr_other_class.gw @@ -1,8 +1,8 @@ #! [contains] can't use non global fptr of other class class C { - funcdef void t_ptr(); + funptr void t_ptr(); } class D { - funcdef void t_ptr(); + funptr void t_ptr(); var C.t_ptr ptr; } diff --git a/tests/tree/func_ptr_array.gw b/tests/tree/func_ptr_array.gw index 521d0bec..e819c805 100644 --- a/tests/tree/func_ptr_array.gw +++ b/tests/tree/func_ptr_array.gw @@ -1 +1 @@ -funcdef int[] test(int i); +funptr int[] test(int i); diff --git a/tests/tree/ptr_arg_array.gw b/tests/tree/ptr_arg_array.gw index fd28a357..93859a46 100644 --- a/tests/tree/ptr_arg_array.gw +++ b/tests/tree/ptr_arg_array.gw @@ -1 +1 @@ -funcdef void test(int i[]); +funptr void test(int i[]); diff --git a/tests/tree/ptr_decl_assign.gw b/tests/tree/ptr_decl_assign.gw index 0f24d535..a7db713d 100644 --- a/tests/tree/ptr_decl_assign.gw +++ b/tests/tree/ptr_decl_assign.gw @@ -1,4 +1,4 @@ -funcdef void Test(); +funptr void Test(); fun void t(){<<< "lol" >>>;} t @=> var Test test; test(); diff --git a/tests/tree/ptr_test.gw b/tests/tree/ptr_test.gw index ff8b06d0..b369f7ec 100644 --- a/tests/tree/ptr_test.gw +++ b/tests/tree/ptr_test.gw @@ -1,4 +1,4 @@ -funcdef void Test(); +funptr void Test(); fun void t0(){} t0 @=> var Test test; test(); diff --git a/tests/tree/static_data_test.gw b/tests/tree/static_data_test.gw index 76b460b8..c44e270f 100644 --- a/tests/tree/static_data_test.gw +++ b/tests/tree/static_data_test.gw @@ -1,6 +1,6 @@ class C { var static int i; - funcdef static void Test(); + funptr static void Test(); var static Test test; } diff --git a/tests/tree/template_fptr.gw b/tests/tree/template_fptr.gw index ad764984..fbf17de8 100644 --- a/tests/tree/template_fptr.gw +++ b/tests/tree/template_fptr.gw @@ -1,4 +1,4 @@ -funcdef int ptr_t:[A](A); +funptr int ptr_t:[A](A); var ptr_t ptr; <<>>; diff --git a/tests/tree/typedef_func.gw b/tests/tree/typedef_func.gw index 29368037..973e6150 100644 --- a/tests/tree/typedef_func.gw +++ b/tests/tree/typedef_func.gw @@ -1,4 +1,4 @@ -funcdef void t_ptr(int i); +funptr void t_ptr(int i); typedef t_ptr A; var A a; <<>>; diff --git a/tests/tree/typedef_func_class.gw b/tests/tree/typedef_func_class.gw index 5089b209..cf9cced0 100644 --- a/tests/tree/typedef_func_class.gw +++ b/tests/tree/typedef_func_class.gw @@ -1,5 +1,5 @@ class C { -funcdef void t_ptr(); +funptr void t_ptr(); typedef t_ptr A; var A a; <<>>; diff --git a/tests/tree/typedef_func_tmpl.gw b/tests/tree/typedef_func_tmpl.gw index c46d94e0..b7f52412 100644 --- a/tests/tree/typedef_func_tmpl.gw +++ b/tests/tree/typedef_func_tmpl.gw @@ -1,4 +1,4 @@ -funcdef void t_ptr:[A](); +funptr void t_ptr:[A](); var t_ptr:[int] iptr; var t_ptr:[float] fptr; diff --git a/tests/tree/typedef_func_tmpl2.gw b/tests/tree/typedef_func_tmpl2.gw index d88fb98e..6c294ce4 100644 --- a/tests/tree/typedef_func_tmpl2.gw +++ b/tests/tree/typedef_func_tmpl2.gw @@ -1,4 +1,4 @@ -funcdef void t_ptr:[A](); +funptr void t_ptr:[A](); fun void test:[A]() { <<< __func__ >>>; } diff --git a/tests/tree/typedef_func_tmpl_class.gw b/tests/tree/typedef_func_tmpl_class.gw index bad4c954..500f8069 100644 --- a/tests/tree/typedef_func_tmpl_class.gw +++ b/tests/tree/typedef_func_tmpl_class.gw @@ -1,5 +1,5 @@ class C { - funcdef void t_ptr:[A](); + funptr void t_ptr:[A](); var t_ptr:[int] iptr; -- 2.43.0