From 1f92e7c348bec299476cdabcda00f88166fbcf58 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Tue, 15 Sep 2020 23:45:27 +0200 Subject: [PATCH] :art: Use 'funcdef' --- 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 +- tests/UsrUgen/null_tick.gw | 2 +- tests/error/empty_member_ptr.gw | 2 +- tests/error/fptr_other_class.gw | 4 ++-- tests/error/func_ptr_empty.gw | 2 +- tests/error/lambda_mismatch2.gw | 2 +- tests/error/lambda_mismatch3.gw | 2 +- tests/error/non_public_typedef_global_scope.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/call_nonnull.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, 74 insertions(+), 74 deletions(-) diff --git a/ast b/ast index bfa25ccb..ae1bfee3 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit bfa25ccbd71243abe8d89b3615e43395c5493e30 +Subproject commit ae1bfee327f32a22d07903b434ce18b138870dee diff --git a/examples/class_func_pointer.gw b/examples/class_func_pointer.gw index be018e22..edf6bdc3 100644 --- a/examples/class_func_pointer.gw +++ b/examples/class_func_pointer.gw @@ -1,7 +1,7 @@ fun void test() { <<< "member function." >>>; } class C { - typedef void func_t(); -#! typedef static void s_func_t(); + funcdef void func_t(); +#! funcdef 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 7b7bf37e..28fa4df5 100644 --- a/examples/func_pointer.gw +++ b/examples/func_pointer.gw @@ -1,4 +1,4 @@ -typedef void func_t(); +funcdef 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 09eced7e..d83e9380 100644 --- a/examples/func_ptr.gw +++ b/examples/func_ptr.gw @@ -1,5 +1,5 @@ #! define a fun pointer type -typedef void Test(); +funcdef void Test(); #! define a few funs fun void test1(){ <<< "test" >>>; }; diff --git a/examples/implicit_fptr.gw b/examples/implicit_fptr.gw index 5184a945..ba34620d 100644 --- a/examples/implicit_fptr.gw +++ b/examples/implicit_fptr.gw @@ -1,4 +1,4 @@ -typedef void t_ptr(); +funcdef 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 0fd3b631..f9758699 100644 --- a/examples/implicit_fptr_class.gw +++ b/examples/implicit_fptr_class.gw @@ -1,6 +1,6 @@ class C { - typedef void t_ptr(); - typedef void t_ptr1(int); + funcdef void t_ptr(); + funcdef 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 6e0e2105..65239057 100644 --- a/examples/implicit_fptr_tmpl.gw +++ b/examples/implicit_fptr_tmpl.gw @@ -1,4 +1,4 @@ -typedef void t_ptr:[A](); +funcdef 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 c0cc0e42..9b73e8a5 100644 --- a/examples/ptr_assign_class.gw +++ b/examples/ptr_assign_class.gw @@ -1,5 +1,5 @@ class C { - typedef void Test(); + funcdef void Test(); fun void test1(){}; var Test test0; <<< test1 @=> test0 >>>; diff --git a/tests/UsrUgen/null_tick.gw b/tests/UsrUgen/null_tick.gw index 35bde49b..91d5280f 100644 --- a/tests/UsrUgen/null_tick.gw +++ b/tests/UsrUgen/null_tick.gw @@ -1,3 +1,3 @@ #! [contains] NullTickException -typedef float ptr_t(float); +funcdef float ptr_t(float); var ptr_t ptr ~= var UsrUGen u; diff --git a/tests/error/empty_member_ptr.gw b/tests/error/empty_member_ptr.gw index 8d7aae20..4e83d5c1 100644 --- a/tests/error/empty_member_ptr.gw +++ b/tests/error/empty_member_ptr.gw @@ -1,7 +1,7 @@ #! [contains] NullPtrException class C { - typedef void test(); + funcdef void test(); var test t; } <<< var C c >>>; diff --git a/tests/error/fptr_other_class.gw b/tests/error/fptr_other_class.gw index 021af700..88fa3e00 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 { - typedef void t_ptr(); + funcdef void t_ptr(); } class D { - typedef void t_ptr(); + funcdef void t_ptr(); var C.t_ptr ptr; } diff --git a/tests/error/func_ptr_empty.gw b/tests/error/func_ptr_empty.gw index de60b4c4..19debcc4 100644 --- a/tests/error/func_ptr_empty.gw +++ b/tests/error/func_ptr_empty.gw @@ -1,4 +1,4 @@ #! [contains] NullPtrException -typedef void Test(); +funcdef void Test(); var Test test; test(); diff --git a/tests/error/lambda_mismatch2.gw b/tests/error/lambda_mismatch2.gw index 397401df..2c5acab3 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 -typedef void ptr_t(int i); +funcdef 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 38c2671e..e2338728 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 -typedef void ptr_t(int i); +funcdef 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/non_public_typedef_global_scope.gw b/tests/error/non_public_typedef_global_scope.gw index 2eaf874e..ac05dd23 100644 --- a/tests/error/non_public_typedef_global_scope.gw +++ b/tests/error/non_public_typedef_global_scope.gw @@ -1,6 +1,6 @@ #! [contains] NullPtrException class C { - typedef void t_ptr(); + funcdef void t_ptr(); } var C.t_ptr ptr; ptr(); diff --git a/tests/error/pointer_outside_class.gw b/tests/error/pointer_outside_class.gw index bc989edc..747aefe7 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 -typedef static void my_fun(); +funcdef static void my_fun(); diff --git a/tests/error/pointer_unknown.gw b/tests/error/pointer_unknown.gw index da39d63f..69c23bc0 100644 --- a/tests/error/pointer_unknown.gw +++ b/tests/error/pointer_unknown.gw @@ -1,2 +1,2 @@ #! [contains] unknown type -typedef unknown_type my_fun(); +funcdef unknown_type my_fun(); diff --git a/tests/error/pointer_unknown_arg.gw b/tests/error/pointer_unknown_arg.gw index c3197721..dfa955fe 100644 --- a/tests/error/pointer_unknown_arg.gw +++ b/tests/error/pointer_unknown_arg.gw @@ -1,2 +1,2 @@ #! [contains] unknown type -typedef void my_func(unknown_type type); +funcdef 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 cb508cae..63e4879e 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' -typedef void my_func(void arg); +funcdef void my_func(void arg); diff --git a/tests/error/ptr_arg_array.gw b/tests/error/ptr_arg_array.gw index 3a8a23a5..82ccabb3 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 -typedef void my_func (int i[4]); +funcdef void my_func (int i[4]); diff --git a/tests/error/ptr_assign_global.gw b/tests/error/ptr_assign_global.gw index 0d065dc0..cd07de6d 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 { - typedef void Test(); + funcdef void Test(); var Test test; } diff --git a/tests/error/ptr_assign_member.gw b/tests/error/ptr_assign_member.gw index 6e3746a9..086f15a6 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 -typedef void Test(); +funcdef 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 d4010091..a885a93d 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 { - typedef void Test(); + funcdef void Test(); var Test test; } diff --git a/tests/error/ptr_defined.gw b/tests/error/ptr_defined.gw index 70eef520..597ba331 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; -typedef void i(); +funcdef void i(); diff --git a/tests/error/ptr_no_match.gw b/tests/error/ptr_no_match.gw index 91897137..0f9da72d 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){} -typedef void Test(); +funcdef void Test(); var Test t; test @=> t; diff --git a/tests/error/ptr_static_outside.gw b/tests/error/ptr_static_outside.gw index c9a3497e..8b2cc591 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 -typedef static void Test(); +funcdef static void Test(); diff --git a/tests/error/ptr_static_outside2.gw b/tests/error/ptr_static_outside2.gw index 8d81b3b7..27098316 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 -typedef static void Test(int i); +funcdef static void Test(int i); diff --git a/tests/error/typedef_func_tmpl_types.gw b/tests/error/typedef_func_tmpl_types.gw index 502f3f31..bda30be4 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 -typedef void t_ptr:[A](); +funcdef 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 fcc804bf..3313edb5 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 -typedef void t_ptr:[A](); +funcdef 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 895f11b4..49818889 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" >>>; } - typedef void PtrType(int i); + funcdef 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 60c2c8be..a5e09108 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" >>>; } - typedef static void PtrType(int i); + funcdef 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 96b0c441..c5c5a289 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" >>>; } - typedef void PtrType(int i); + funcdef 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 0ceb2c65..ecbca6a9 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" >>>; } - typedef static void PtrType(int i); + funcdef 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 8721a99b..ce37103f 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" >>>; } - typedef static void PtrType(int i); + funcdef 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 ef3c6fa0..5c14dcac 100644 --- a/tests/fptr/fptr_class_type.gw +++ b/tests/fptr/fptr_class_type.gw @@ -1,2 +1,2 @@ -typedef void ptr_t(); +funcdef 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 2076ed56..07222040 100644 --- a/tests/fptr/fptr_global0.gw +++ b/tests/fptr/fptr_global0.gw @@ -1,3 +1,3 @@ class C { -typedef global void global_fptr(int i); +funcdef global void global_fptr(int i); } diff --git a/tests/fptr/fptr_tmpl_cast.gw b/tests/fptr/fptr_tmpl_cast.gw index 670e3169..3ede83a1 100644 --- a/tests/fptr/fptr_tmpl_cast.gw +++ b/tests/fptr/fptr_tmpl_cast.gw @@ -1,5 +1,5 @@ class C { - typedef void ptr_t:[A](); + funcdef 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 b35adce1..5d00e07d 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; - typedef void t_fptr0(); - typedef void t_fptr1(int i); + funcdef void t_fptr0(); + funcdef 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 06261641..3c85a766 100644 --- a/tests/new/implicit_fptr.gw +++ b/tests/new/implicit_fptr.gw @@ -1,5 +1,5 @@ class C { - typedef void T(); + funcdef 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 62f4a035..d3a3096a 100644 --- a/tests/new/lambda.gw +++ b/tests/new/lambda.gw @@ -1,5 +1,5 @@ class C { - typedef void ptr_t(int i,int j); + funcdef 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 0953a1af..7726fbea 100644 --- a/tests/new/lambda2.gw +++ b/tests/new/lambda2.gw @@ -1,5 +1,5 @@ class C { - typedef void ptr_t(int i); + funcdef 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 aa7d105d..848e173a 100644 --- a/tests/new/spork_fptr.gw +++ b/tests/new/spork_fptr.gw @@ -1,9 +1,9 @@ class C { - typedef void t_fptr(int i); + funcdef void t_fptr(int i); fun void test(int i) { <<< this , " ", __func__, " ", i >>>;} test @=> var t_fptr ptr; } -typedef void t_fptr(int i); +funcdef 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 1081cd20..2e5ef137 100644 --- a/tests/new/spork_fptr2.gw +++ b/tests/new/spork_fptr2.gw @@ -1,5 +1,5 @@ class C { - typedef void t_fptr(int i, int); + funcdef 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 fb9ebba0..9040b4c0 100644 --- a/tests/new/test.gw +++ b/tests/new/test.gw @@ -1,5 +1,5 @@ class C { - typedef static void func_t:[A](A a); + funcdef 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 760fa7a7..4648f554 100644 --- a/tests/new/test2.gw +++ b/tests/new/test2.gw @@ -1,5 +1,5 @@ class C:[A] { - typedef static void func_t:[A](A a); + funcdef 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 949383e6..f565ec3f 100644 --- a/tests/new/typedef_func_class.gw +++ b/tests/new/typedef_func_class.gw @@ -1,5 +1,5 @@ class C { - typedef void t_ptr(); + funcdef 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 acd1abf9..1cd72085 100644 --- a/tests/new/typedef_func_class_variadic.gw +++ b/tests/new/typedef_func_class_variadic.gw @@ -1,5 +1,5 @@ class C { - typedef void t_ptr(...); + funcdef 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 f87ad63a..2d4c8b6d 100644 --- a/tests/new/typedef_func_tmpl_class.gw +++ b/tests/new/typedef_func_tmpl_class.gw @@ -1,5 +1,5 @@ class C { - typedef void t_ptr:[A](); + funcdef 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 d1403022..ccc6d294 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 { - typedef static void t_ptr:[A](); + funcdef 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 a23a1ec8..41636664 100644 --- a/tests/new/typedef_func_tmpl_err.gw +++ b/tests/new/typedef_func_tmpl_err.gw @@ -1,4 +1,4 @@ -typedef void t_ptr:[A](); +funcdef 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 4e47c18e..76988807 100644 --- a/tests/new/typedef_func_tmpl_tmpl.gw +++ b/tests/new/typedef_func_tmpl_tmpl.gw @@ -1,2 +1,2 @@ -typedef void ptr_t:[A](myPtr ptr); +funcdef 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 9526f4c6..6d35aabb 100644 --- a/tests/tree/assign_member_ptr.gw +++ b/tests/tree/assign_member_ptr.gw @@ -1,6 +1,6 @@ class C { - typedef void Test(); + funcdef void Test(); var Test test; fun void func(){} } diff --git a/tests/tree/call_nonnull.gw b/tests/tree/call_nonnull.gw index 982684d0..49ba3189 100644 --- a/tests/tree/call_nonnull.gw +++ b/tests/tree/call_nonnull.gw @@ -1,3 +1,3 @@ -typedef void test_t:[A](); +funcdef void test_t:[A](); nonnull test_t t; t:[int](); diff --git a/tests/tree/fptr_call_decl.gw b/tests/tree/fptr_call_decl.gw index 284de9a5..4319fe7b 100644 --- a/tests/tree/fptr_call_decl.gw +++ b/tests/tree/fptr_call_decl.gw @@ -1,2 +1,2 @@ -typedef void test(int); +funcdef void test(int); (var test t)(2); diff --git a/tests/tree/fptr_class.gw b/tests/tree/fptr_class.gw index 10904dbc..c0144a56 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" >>>; } - typedef void ptr_t(int i); + funcdef 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 b82faa5e..ab49210e 100644 --- a/tests/tree/fptr_global0.gw +++ b/tests/tree/fptr_global0.gw @@ -1,3 +1,3 @@ class C { - typedef global void global_fptr(int i); + funcdef global void global_fptr(int i); } diff --git a/tests/tree/fptr_other_class.gw b/tests/tree/fptr_other_class.gw index 021af700..88fa3e00 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 { - typedef void t_ptr(); + funcdef void t_ptr(); } class D { - typedef void t_ptr(); + funcdef 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 842ba835..521d0bec 100644 --- a/tests/tree/func_ptr_array.gw +++ b/tests/tree/func_ptr_array.gw @@ -1 +1 @@ -typedef int[] test(int i); +funcdef int[] test(int i); diff --git a/tests/tree/ptr_arg_array.gw b/tests/tree/ptr_arg_array.gw index 9fa85ecc..fd28a357 100644 --- a/tests/tree/ptr_arg_array.gw +++ b/tests/tree/ptr_arg_array.gw @@ -1 +1 @@ -typedef void test(int i[]); +funcdef void test(int i[]); diff --git a/tests/tree/ptr_decl_assign.gw b/tests/tree/ptr_decl_assign.gw index 47d764ba..0f24d535 100644 --- a/tests/tree/ptr_decl_assign.gw +++ b/tests/tree/ptr_decl_assign.gw @@ -1,4 +1,4 @@ -typedef void Test(); +funcdef 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 899801c5..509a5be8 100644 --- a/tests/tree/ptr_test.gw +++ b/tests/tree/ptr_test.gw @@ -1,4 +1,4 @@ -typedef void Test(); +funcdef 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 46cfbdb2..76b460b8 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; - typedef static void Test(); + funcdef static void Test(); var static Test test; } diff --git a/tests/tree/template_fptr.gw b/tests/tree/template_fptr.gw index fa7bf24e..ad764984 100644 --- a/tests/tree/template_fptr.gw +++ b/tests/tree/template_fptr.gw @@ -1,4 +1,4 @@ -typedef int ptr_t:[A](A); +funcdef int ptr_t:[A](A); var ptr_t ptr; <<>>; diff --git a/tests/tree/typedef_func.gw b/tests/tree/typedef_func.gw index cf506d70..29368037 100644 --- a/tests/tree/typedef_func.gw +++ b/tests/tree/typedef_func.gw @@ -1,4 +1,4 @@ -typedef void t_ptr(int i); +funcdef 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 44d9277e..5089b209 100644 --- a/tests/tree/typedef_func_class.gw +++ b/tests/tree/typedef_func_class.gw @@ -1,5 +1,5 @@ class C { -typedef void t_ptr(); +funcdef 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 ef274bf1..c46d94e0 100644 --- a/tests/tree/typedef_func_tmpl.gw +++ b/tests/tree/typedef_func_tmpl.gw @@ -1,4 +1,4 @@ -typedef void t_ptr:[A](); +funcdef 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 af9900e5..d88fb98e 100644 --- a/tests/tree/typedef_func_tmpl2.gw +++ b/tests/tree/typedef_func_tmpl2.gw @@ -1,4 +1,4 @@ -typedef void t_ptr:[A](); +funcdef 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 f5bb6e36..bad4c954 100644 --- a/tests/tree/typedef_func_tmpl_class.gw +++ b/tests/tree/typedef_func_tmpl_class.gw @@ -1,5 +1,5 @@ class C { - typedef void t_ptr:[A](); + funcdef void t_ptr:[A](); var t_ptr:[int] iptr; -- 2.43.0