From a6063deda7c2983c323cced9ab3c689728c62202 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Sat, 30 Jul 2022 13:23:30 +0200 Subject: [PATCH] :art: use :=> for closure assignement --- examples/array_lit.gw | 2 +- examples/array_multiple.gw | 6 +++--- examples/class_func_pointer.gw | 12 ++++++------ examples/class_spork_exp.gw | 4 ++-- examples/const_prop.gw | 2 +- examples/empty_string.gw | 2 +- examples/extend_array_type_decl.gw | 2 +- examples/float.gw | 16 ++++++++-------- examples/func_pointer.gw | 4 ++-- examples/func_ptr.gw | 6 +++--- examples/implicit_fptr_class.gw | 2 +- examples/int.gw | 12 ++++++------ examples/member.gw | 4 ++-- examples/ptr_assign_class.gw | 2 +- examples/ptr_cast.gw | 2 +- examples/spork_exp.gw | 4 ++-- examples/static.gw | 4 ++-- examples/string.gw | 4 ++-- plug | 2 +- src/lib/array.c | 2 +- src/lib/closure.c | 6 +++--- src/lib/object_op.c | 2 +- src/lib/prim.c | 14 +++++++------- src/lib/ptr.c | 2 +- src/lib/union.c | 2 +- src/parse/check.c | 4 ++-- tests/bug/array.gw | 4 ++-- tests/bug/do_until.gw | 2 +- tests/bug/do_while.gw | 8 ++++---- tests/bug/object_string.gw | 2 +- tests/bug/play_with_str.gw | 4 ++-- tests/captures/lambda_captures.gw | 2 +- tests/chuck_rewrite/chuck_rewrite.gw | 4 ++-- tests/chuck_rewrite/chuck_rewrite_error.gw | 4 ++-- tests/ctor/ctor_outside.gw | 2 +- tests/ctor/ctor_overload.gw | 6 +++--- tests/deep_equal/eq.gw | 4 ++-- tests/deep_equal/eq_fail.gw | 6 +++--- tests/deep_equal/ne.gw | 4 ++-- tests/deep_equal/ne_fail.gw | 6 +++--- tests/dict/dict.gw | 6 +++--- tests/dict/dict_noleak.gw | 6 +++--- tests/dict/dict_remove.gw | 6 +++--- tests/effects/funptr_eff.gw | 2 +- tests/effects/try.gw | 4 ++-- tests/error/array_assign_exp.gw | 2 +- tests/error/array_depth_match.gw | 2 +- tests/error/array_mutable.gw | 2 +- tests/error/array_type_match.gw | 2 +- tests/error/const_arg.gw | 2 +- tests/error/const_non_mutable.gw | 4 ++-- tests/error/error.gw | 2 +- tests/error/implicit_inside.gw | 2 +- tests/error/invalid_array_acces.gw | 2 +- tests/error/op_test.gw | 2 +- tests/error/ptr_no_match.gw | 2 +- tests/error/right_mutable.gw | 2 +- tests/error/typedef_func_tmpl_types.gw | 2 +- tests/error/typedef_func_tmpl_types2.gw | 2 +- tests/fork/fork_join2.gw | 2 +- tests/fptr/class_ptr1.gw | 4 ++-- tests/fptr/class_ptr2.gw | 4 ++-- tests/fptr/class_ptr3.gw | 4 ++-- tests/fptr/fptr_class_type.gw | 2 +- tests/fptr/generated.gw | 2 +- tests/functionnal_array/concatmap.gw | 10 +++++----- tests/functionnal_array/map.gw | 16 ++++++++-------- tests/internal_op/conditionnal.gw | 2 +- tests/internal_op/implicit.gw | 2 +- tests/internal_op/unconditionnal.gw | 2 +- tests/interp/exp.gw | 2 +- tests/interp/exp_lit.gw | 2 +- tests/interp/to_string.gw | 4 ++-- tests/lambdas/lambda.gw | 4 ++-- tests/lambdas/lambda2.gw | 4 ++-- tests/lambdas/lambda3.gw | 2 +- tests/lambdas/lambda_mismatch2.gw | 2 +- tests/lambdas/lambda_mismatch3.gw | 2 +- tests/new/class_fptr_returns_fptr.gw | 4 ++-- tests/new/float.gw | 2 +- tests/new/global_func0.gw | 6 +++--- tests/new/spork_fptr.gw | 4 ++-- tests/new/spork_fptr2.gw | 2 +- tests/new/template_class_in_template.gw | 4 ++-- tests/new/typedef_func_class.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/plug/coverage.gw | 4 ++-- tests/plug/fptr.gw | 4 ++-- tests/plug/global_var.gw | 4 ++-- tests/plug/struct.gw | 4 ++-- tests/plug/typedef.gw | 2 +- tests/plug/union.gw | 8 ++++---- tests/ref/ref.gw | 2 +- tests/slice/slice_array.gw | 2 +- tests/string/eq.gw | 4 ++-- tests/string/erase.gw | 2 +- tests/string/string_access.gw | 4 ++-- tests/struct/member_func.gw | 4 ++-- tests/struct/struct_gack.gw | 3 ++- tests/struct/struct_member.gw | 4 ++-- tests/struct/struct_member_func.gw | 4 ++-- tests/struct/struct_noctor.gw | 2 +- tests/struct/struct_return.gw | 4 ++-- tests/struct/struct_static.gw | 6 +++--- tests/struct/struct_static_func.gw | 2 +- tests/struct/t.gw | 2 +- tests/tree/array_test.gw | 2 +- tests/tree/assign_member_ptr.gw | 2 +- tests/tree/auto_ptr.gw | 2 +- tests/tree/binary.gw | 2 +- tests/tree/branch_eq_float.gw | 2 +- tests/tree/char.gw | 2 +- tests/tree/class_binary.gw | 2 +- tests/tree/class_dur.gw | 2 +- tests/tree/class_until.gw | 2 +- tests/tree/class_while.gw | 2 +- tests/tree/const.gw | 2 +- tests/tree/dur.gw | 2 +- tests/tree/dur_exp.gw | 2 +- tests/tree/f2i_cast.gw | 2 +- tests/tree/fptr_class.gw | 4 ++-- tests/tree/new.gw | 8 ++++---- tests/tree/protect.gw | 2 +- tests/tree/ptr_decl_assign.gw | 2 +- tests/tree/ptr_test.gw | 2 +- tests/tree/return_void.gw | 4 ++-- tests/tree/shredule_test.gw | 4 ++-- tests/tree/simple_assign.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 | 4 ++-- tests/tree/typedef_func_tmpl2.gw | 4 ++-- tests/tree/typedef_func_tmpl_class.gw | 2 +- tests/tree/until.gw | 2 +- tests/tree/var_from_parent.gw | 2 +- tests/tree/while.gw | 2 +- tests/union/none.gw | 2 +- tests/union/option.gw | 2 +- tests/union/option_check.gw | 2 +- tests/union/union.gw | 4 ++-- 143 files changed, 249 insertions(+), 248 deletions(-) diff --git a/examples/array_lit.gw b/examples/array_lit.gw index d41180a7..4e2a30db 100644 --- a/examples/array_lit.gw +++ b/examples/array_lit.gw @@ -8,7 +8,7 @@ var Object[2][3] p; var Object[2][3][4] r; var Object[2][3][4][5] s; var Object[2][12][3][4][5] t; -[1,2,3,4] => i; +[1,2,3,4] :=> i; var int k[1][1]; diff --git a/examples/array_multiple.gw b/examples/array_multiple.gw index 55feac7d..65577871 100644 --- a/examples/array_multiple.gw +++ b/examples/array_multiple.gw @@ -5,11 +5,11 @@ class A var A a[4][4]; <<< a[2][3] >>>; -<<< 2 => a[2][3].i >>>; +<<< 2 :=> a[2][3].i >>>; var int i[4][4]; -<<< 54 => i[2][3] >>>; +<<< 54 :=> i[2][3] >>>; var float f[4][4]; <<< f[2][3] >>>; -<<< 12.345 => f[2][3] >>>; +<<< 12.345 :=> f[2][3] >>>; diff --git a/examples/class_func_pointer.gw b/examples/class_func_pointer.gw index c97ff2c4..59966b91 100644 --- a/examples/class_func_pointer.gw +++ b/examples/class_func_pointer.gw @@ -8,14 +8,14 @@ class C { fun void test() { <<< "member function." >>>; } fun void test2() { <<< "member function variant." >>>; } #! fun static void s_test() { <<< "member fun." >>>; } -#! test @=> func_p; -#! test @=> s_ptr; +#! test :=> func_p; +#! test :=> s_ptr; #! those are forbidden #!func_p(); #!this.func_p(); - test2 @=> func_p; + test2 :=> func_p; #!func_p(); test(); @@ -26,8 +26,8 @@ test(); var C c; c.func_p(); -#!test @=> c.s_func_p; -c.test @=> c.func_p; +#!test :=> c.s_func_p; +c.test :=> c.func_p; c.func_p(); -c.test2 @=> c.func_p; +c.test2 :=> c.func_p; c.func_p(); diff --git a/examples/class_spork_exp.gw b/examples/class_spork_exp.gw index 93599e4d..830d424e 100644 --- a/examples/class_spork_exp.gw +++ b/examples/class_spork_exp.gw @@ -1,13 +1,13 @@ class C { - 12 => var int i; + 12 :=> var int i; var Object o; spork { "test"; second => now; var string s; <<< "test spork exp." >>>; - } => var Shred shred; + } :=> var Shred shred; } var C c; diff --git a/examples/const_prop.gw b/examples/const_prop.gw index 6becaae0..0cd99b60 100644 --- a/examples/const_prop.gw +++ b/examples/const_prop.gw @@ -1,5 +1,5 @@ var int i; -<<< 2 => i >>>; +<<< 2 :=> i >>>; <<< i >>>; <<< i +=> i >>>; <<< 13 => i >>>; diff --git a/examples/empty_string.gw b/examples/empty_string.gw index 60b3984d..12faafca 100644 --- a/examples/empty_string.gw +++ b/examples/empty_string.gw @@ -1,2 +1,2 @@ -"test" => var string s; +"test" :=> var string s; <<< s >>>; diff --git a/examples/extend_array_type_decl.gw b/examples/extend_array_type_decl.gw index b361cff7..9139aa7c 100644 --- a/examples/extend_array_type_decl.gw +++ b/examples/extend_array_type_decl.gw @@ -1,6 +1,6 @@ class C extends int[2] { <<< "test" >>>; - 123 => var int i; + 123 :=> var int i; } var C c; diff --git a/examples/float.gw b/examples/float.gw index c827fa33..a838d724 100644 --- a/examples/float.gw +++ b/examples/float.gw @@ -103,7 +103,7 @@ var float a; { var float variable1; var float variable2; - <<< variable1=>variable2 >>>; + <<< variable1:=>variable2 >>>; } #!testing operator for float and float @@ -129,8 +129,8 @@ var float a; #!testing operator for float and float { - 1 => var float variable1; - 1 => var float variable2; + 1 :=> var float variable1; + 1 :=> var float variable2; <<< variable1/=>variable2 >>>; } @@ -222,7 +222,7 @@ var float a; { var int variable1; var float variable2; - <<< variable1=>variable2 >>>; + <<< variable1:=>variable2 >>>; } #!testing operator for int and float @@ -249,7 +249,7 @@ var float a; #!testing operator for int and float { var int variable1; - 1 => var float variable2; + 1 :=> var float variable2; <<< variable1/=>variable2 >>>; } @@ -343,7 +343,7 @@ var float a; { var float variable1; var int variable2; - <<< variable1=>variable2 >>>; + <<< variable1:=>variable2 >>>; } #!testing operator for float and int @@ -369,7 +369,7 @@ var float a; #!testing operator for float and int { - 1 => var float variable1; - 1 => var int variable2; + 1 :=> var float variable1; + 1 :=> var int variable2; <<< variable1/=>variable2 >>>; } diff --git a/examples/func_pointer.gw b/examples/func_pointer.gw index 13e538ed..e83f0bb6 100644 --- a/examples/func_pointer.gw +++ b/examples/func_pointer.gw @@ -2,14 +2,14 @@ funptr void func_t(); var func_t func_p; fun void test1() { <<< "test1" >>>; } fun void test2() { <<< "test2" >>>; } -test1 @=> func_p; +test1 :=> func_p; func_p(); func_p(); func_p(); () => func_p; <<< func_p >>>; <<< func_p() >>>; -test2 @=> func_p; +test2 :=> func_p; func_p(); func_p(); func_p(); diff --git a/examples/func_ptr.gw b/examples/func_ptr.gw index 9c85b25d..efaaba8c 100644 --- a/examples/func_ptr.gw +++ b/examples/func_ptr.gw @@ -10,15 +10,15 @@ fun void test3(){ <<< "yet another test" >>>; }; var Test test; #! assign it a fun -test1 @=> test; +test1 :=> test; #! test it test(); #! ... -test2 @=> test; +test2 :=> test; test(); -test3 @=> test; +test3 :=> test; test(); <<< test3 $ Test >>>; diff --git a/examples/implicit_fptr_class.gw b/examples/implicit_fptr_class.gw index f7020dae..58f43802 100644 --- a/examples/implicit_fptr_class.gw +++ b/examples/implicit_fptr_class.gw @@ -10,6 +10,6 @@ class C { test $ t_ptr; \{ <<< __func__ >>>; } $ t_ptr;#!; => test; \{ <<< __func__ >>>; } => test; - \a{} @=> var t_ptr1 ptr1; + \a{} :=> var t_ptr1 ptr1; } var C c; diff --git a/examples/int.gw b/examples/int.gw index 0d16ded1..62f30fa9 100644 --- a/examples/int.gw +++ b/examples/int.gw @@ -26,14 +26,14 @@ var int a; #!testing operator for int and int { var int variable1; - 1 => var int variable2; + 1 :=> var int variable2; <<< variable1/variable2 >>>; } #!testing operator for int and int { var int variable1; - 1 => var int variable2; + 1 :=> var int variable2; <<< variable1%variable2 >>>; } @@ -168,7 +168,7 @@ var int a; { var int variable1; var int variable2; -<<< variable1=>variable2 >>>; +<<< variable1:=>variable2 >>>; } #!testing operator for int and int @@ -194,14 +194,14 @@ var int a; #!testing operator for int and int { - 1 => var int variable1; - 1 => var int variable2; + 1 :=> var int variable1; + 1 :=> var int variable2; <<< variable1/=>variable2 >>>; } #!testing operator for int and int { - 1 => var int variable1; + 1 :=> var int variable1; var int variable2; <<< variable1%=>variable2 >>>; } diff --git a/examples/member.gw b/examples/member.gw index b06f513d..2f80c636 100644 --- a/examples/member.gw +++ b/examples/member.gw @@ -17,5 +17,5 @@ var C c; <<< c.m_i(), " ", c.m_f(), " ", c.m_o() >>>; #! write members -<<< 12 => c.i >>>; -<<< 1.2 => c.f >>>; +<<< 12 :=> c.i >>>; +<<< 1.2 :=> c.f >>>; diff --git a/examples/ptr_assign_class.gw b/examples/ptr_assign_class.gw index 7e4c44bb..b1c04b92 100644 --- a/examples/ptr_assign_class.gw +++ b/examples/ptr_assign_class.gw @@ -2,7 +2,7 @@ class C { funptr void Test(); fun void test1(){}; var Test test0; - <<< test1 @=> test0 >>>; + <<< test1 :=> test0 >>>; } var C c; diff --git a/examples/ptr_cast.gw b/examples/ptr_cast.gw index a9324924..4043e527 100644 --- a/examples/ptr_cast.gw +++ b/examples/ptr_cast.gw @@ -1,2 +1,2 @@ -12 => var int i; +12 :=> var int i; <<>>; diff --git a/examples/spork_exp.gw b/examples/spork_exp.gw index f840c042..065b6aa8 100644 --- a/examples/spork_exp.gw +++ b/examples/spork_exp.gw @@ -1,6 +1,6 @@ class C { - 12 => var int i; + 12 :=> var int i; var Object o; <<< this >>>; spork { @@ -9,7 +9,7 @@ class C var string s; <<< this, " test spork exp. " , s >>>; - } => var Shred shred; + } :=> var Shred shred; } var C c; diff --git a/examples/static.gw b/examples/static.gw index 777b56f7..3180af77 100644 --- a/examples/static.gw +++ b/examples/static.gw @@ -20,5 +20,5 @@ class C <<< C._i(), " ", C._f(), " ", C._o() >>>; #! write members -<<< 12 => C.i >>>; -<<< 1.2 => C.f >>>; +<<< 12 :=> C.i >>>; +<<< 1.2 :=> C.f >>>; diff --git a/examples/string.gw b/examples/string.gw index a0ce84ba..2e415252 100644 --- a/examples/string.gw +++ b/examples/string.gw @@ -1,3 +1,3 @@ var string s; -"CamelCase" => s; -<<< "test" => s >>>; +"CamelCase" :=> s; +<<< "test" :=> s >>>; diff --git a/plug b/plug index c9321c37..280932ab 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit c9321c371bd077408face4d5c036b46bb0c9d5af +Subproject commit 280932ab822dc4ba6ec530b2df1308286fab4322 diff --git a/src/lib/array.c b/src/lib/array.c index bfb6c87c..00ef4d08 100644 --- a/src/lib/array.c +++ b/src/lib/array.c @@ -895,7 +895,7 @@ GWION_IMPORT(array) { GWI_BB(gwi_oper_ini(gwi, "Array", "Array", NULL)) GWI_BB(gwi_oper_add(gwi, opck_array_at)) - GWI_BB(gwi_oper_end(gwi, "=>", NULL)) + GWI_BB(gwi_oper_end(gwi, ":=>", NULL)) GWI_BB(gwi_oper_add(gwi, opck_array_implicit)) // GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) GWI_BB(gwi_oper_end(gwi, "@implicit", NoOp)) diff --git a/src/lib/closure.c b/src/lib/closure.c index 43a66c48..3ed812ac 100644 --- a/src/lib/closure.c +++ b/src/lib/closure.c @@ -405,7 +405,7 @@ static OP_CHECK(opck_auto_fptr) { // we'll only deal with auto fptr declaration if (bin->rhs->exp_type != ae_exp_decl && bin->rhs->d.exp_decl.td->xid != insert_symbol("auto")) - ERR_N(bin->lhs->pos, "invalid {G+}function{0} {+}@=>{0} {+G}function{0} assignment"); + ERR_N(bin->lhs->pos, "invalid {G+}function{0} {+}:=>{0} {+G}function{0} assignment"); if (bin->lhs->exp_type == ae_exp_td) ERR_N(bin->lhs->pos, "can't use {/}type decl expressions{0} in auto function pointer declarations"); if(!bin->lhs->type->info->func) @@ -758,7 +758,7 @@ GWION_IMPORT(func) { GWI_BB(gwi_oper_ini(gwi, "function", "funptr", NULL)) GWI_BB(gwi_oper_add(gwi, opck_fptr_assign)) GWI_BB(gwi_oper_emi(gwi, opem_fptr_assign)) - GWI_BB(gwi_oper_end(gwi, "@=>", NULL)) + GWI_BB(gwi_oper_end(gwi, ":=>", NULL)) GWI_BB(gwi_oper_add(gwi, opck_fptr_impl)) GWI_BB(gwi_oper_emi(gwi, opem_fptr_impl)) GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) @@ -772,7 +772,7 @@ GWION_IMPORT(func) { GWI_BB(gwi_oper_end(gwi, "$", NULL)) GWI_BB(gwi_oper_ini(gwi, "function", "function", NULL)) GWI_BB(gwi_oper_add(gwi, opck_auto_fptr)) - GWI_BB(gwi_oper_end(gwi, "@=>", int_r_assign)) + GWI_BB(gwi_oper_end(gwi, ":=>", int_r_assign)) GWI_BB(gwi_oper_ini(gwi, "function", NULL, NULL)) GWI_BB(gwi_oper_add(gwi, opck_func_partial)) GWI_BB(gwi_oper_end(gwi, "@partial", NULL)) diff --git a/src/lib/object_op.c b/src/lib/object_op.c index a883a272..bf6f3c3c 100644 --- a/src/lib/object_op.c +++ b/src/lib/object_op.c @@ -438,7 +438,7 @@ GWION_IMPORT(object_op) { GWI_BB(gwi_oper_ini(gwi, "Object", "Object", NULL)) GWI_BB(gwi_oper_add(gwi, opck_object_at)) GWI_BB(gwi_oper_emi(gwi, opem_object_at)) - GWI_BB(gwi_oper_end(gwi, "=>", NULL)) + GWI_BB(gwi_oper_end(gwi, ":=>", NULL)) GWI_BB(gwi_oper_ini(gwi, "Object", "Object", "bool")) GWI_BB(gwi_oper_end(gwi, "==", EqObject)) GWI_BB(gwi_oper_end(gwi, "!=", NeqObject)) diff --git a/src/lib/prim.c b/src/lib/prim.c index d96470b7..6b779863 100644 --- a/src/lib/prim.c +++ b/src/lib/prim.c @@ -169,7 +169,7 @@ static GWION_IMPORT(int_logical) { static GWION_IMPORT(int_r) { GWI_BB(gwi_oper_ini(gwi, "int", "int", "int")) - CHECK_OP("=>", rassign, r_assign) + CHECK_OP(":=>", rassign, r_assign) CHECK_OP("+=>", rassign, r_plus) CHECK_OP("-=>", rassign, r_minus) CHECK_OP("*=>", rassign, r_mul) @@ -384,7 +384,7 @@ static GWION_IMPORT(intfloat) { GWI_BB(gwi_oper_end(gwi, "-", int_float_minus)) GWI_BB(gwi_oper_add(gwi, opck_int_float_div)) GWI_BB(gwi_oper_end(gwi, "/", int_float_div)) - CHECK_IF("=>", rassign, r_assign) + CHECK_IF(":=>", rassign, r_assign) CHECK_IF("+=>", rassign, r_plus) CHECK_IF("-=>", rassign, r_minus) CHECK_IF("*=>", rassign, r_mul) @@ -439,7 +439,7 @@ static GWION_IMPORT(floatint) { GWI_BB(gwi_oper_end(gwi, "*", float_int_mul)) GWI_BB(gwi_oper_add(gwi, opck_float_int_div)) GWI_BB(gwi_oper_end(gwi, "/", float_int_div)) - CHECK_FI("=>", rassign, r_assign) + CHECK_FI(":=>", rassign, r_assign) CHECK_FI("+=>", rassign, r_plus) CHECK_FI("-=>", rassign, r_minus) CHECK_FI("*=>", rassign, r_mul) @@ -468,7 +468,7 @@ static GWION_IMPORT(floatint) { static GWION_IMPORT(dur) { GWI_BB(gwi_oper_cond(gwi, "dur", BranchEqFloat, BranchNeqFloat)) GWI_BB(gwi_oper_ini(gwi, "dur", "dur", "dur")) - CHECK_FF("=>", rassign, r_assign) + CHECK_FF(":=>", rassign, r_assign) CHECK_FF("+=>", rassign, r_plus) CHECK_FF("-=>", rassign, r_minus) CHECK_FF("*=>", rassign, r_mul) @@ -513,7 +513,7 @@ static OP_CHECK(opck_now) { static GWION_IMPORT(time) { GWI_BB(gwi_oper_cond(gwi, "time", BranchEqFloat, BranchNeqFloat)) GWI_BB(gwi_oper_ini(gwi, "time", "time", "time")) - CHECK_FF("=>", rassign, r_assign) + CHECK_FF(":=>", rassign, r_assign) GWI_BB(gwi_oper_ini(gwi, "time", "dur", "time")) GWI_BB(gwi_oper_end(gwi, "+", float_add)) GWI_BB(gwi_oper_end(gwi, "*", float_mul)) @@ -525,7 +525,7 @@ static GWION_IMPORT(time) { CHECK_FF("*=>", rassign, r_mul) CHECK_FF("/=>", rassign, r_div) GWI_BB(gwi_oper_ini(gwi, "dur", "time", "time")) - CHECK_FF("=>", rassign, r_assign) + CHECK_FF(":=>", rassign, r_assign) GWI_BB(gwi_oper_end(gwi, "+", float_add)) GWI_BB(gwi_oper_ini(gwi, "dur", "@now", "time")) _CHECK_OP("=>", now, Time_Advance) @@ -591,7 +591,7 @@ static GWION_IMPORT(float) { IMPORT_BINARY_FLOAT(mul, *); IMPORT_BINARY_FLOAT(div, /); GWI_BB(gwi_oper_end(gwi, "@implicit", NULL)) - CHECK_FF("=>", rassign, r_assign) + CHECK_FF(":=>", rassign, r_assign) CHECK_FF("+=>", rassign, r_plus) CHECK_FF("-=>", rassign, r_minus) CHECK_FF("*=>", rassign, r_mul) diff --git a/src/lib/ptr.c b/src/lib/ptr.c index 55c2495b..f623dd7d 100644 --- a/src/lib/ptr.c +++ b/src/lib/ptr.c @@ -203,6 +203,6 @@ GWION_IMPORT(ptr) { GWI_BB(gwi_oper_ini(gwi, "Ptr", "Ptr", "Ptr")) GWI_BB(gwi_oper_add(gwi, opck_ptr_ref)) // GWI_BB(gwi_oper_emi(gwi, opem_ptr_ref)) - GWI_BB(gwi_oper_end(gwi, "=>", int_r_assign)) + GWI_BB(gwi_oper_end(gwi, "::=>", int_r_assign)) return GW_OK; } diff --git a/src/lib/union.c b/src/lib/union.c index 0f2b2ea8..d41660b6 100644 --- a/src/lib/union.c +++ b/src/lib/union.c @@ -150,7 +150,7 @@ ANN GWION_IMPORT(union) { GWI_BB(gwi_oper_ini(gwi, "None", "None", "None")) GWI_BB(gwi_oper_add(gwi, opck_none)) GWI_BB(gwi_oper_emi(gwi, opem_none)) - GWI_BB(gwi_oper_end(gwi, "=>", NoOp)) + GWI_BB(gwi_oper_end(gwi, ":=>", NoOp)) const Type t_union = gwi_class_ini(gwi, "union", "Object"); gwi_class_xtor(gwi, NULL, UnionDtor); diff --git a/src/parse/check.c b/src/parse/check.c index 4e50f563..1ef192f6 100644 --- a/src/parse/check.c +++ b/src/parse/check.c @@ -816,7 +816,7 @@ ANN m_bool func_check(const Env env, Exp_Call *const exp) { exp->func->d.exp_dot.is_call = exp; if (exp->func->exp_type == ae_exp_decl) ERR_B(exp->func->pos, _("Can't call late function pointer at declaration " - "site. did you meant to use `@=>`?")) + "site. did you meant to use `:=>`?")) const Type t = actual_type(env->gwion, exp->func->type); if (is_func(env->gwion, t) && exp->func->exp_type == ae_exp_dot && // is_callable !t->info->value->from->owner_class) { @@ -917,7 +917,7 @@ ANN Type check_exp_call1(const Env env, Exp_Call *const exp) { ANN static Type check_exp_binary(const Env env, const Exp_Binary *bin) { CHECK_OO(check_exp(env, bin->lhs)); - const m_bool is_auto = (bin->op == insert_symbol("=>") || bin->op == insert_symbol("@=>")) && + const m_bool is_auto = bin->op == insert_symbol(":=>") && bin->rhs->exp_type == ae_exp_decl && bin->rhs->d.exp_decl.type == env->gwion->type[et_auto]; if (is_auto) bin->rhs->d.exp_decl.type = bin->lhs->type; diff --git a/tests/bug/array.gw b/tests/bug/array.gw index 3b8d4615..f8103a28 100644 --- a/tests/bug/array.gw +++ b/tests/bug/array.gw @@ -5,8 +5,8 @@ class Test_Array i[0]; f[0]; - 2 => i[0]; - 5.7 => f[0]; + 2 :=> i[0]; + 5.7 :=> f[0]; i << 1; f << 1.2; diff --git a/tests/bug/do_until.gw b/tests/bug/do_until.gw index 3daed348..0882eae9 100644 --- a/tests/bug/do_until.gw +++ b/tests/bug/do_until.gw @@ -4,7 +4,7 @@ while(i < 6); do { <<< i-- >>>; } while(i); -6 => var float f; +6 :=> var float f; do { <<< 1 -=> f >>>; } while(f); diff --git a/tests/bug/do_while.gw b/tests/bug/do_while.gw index 16f87468..8e76b28f 100644 --- a/tests/bug/do_while.gw +++ b/tests/bug/do_while.gw @@ -1,10 +1,10 @@ -5 => var int i; +5 :=> var int i; do { <<< i-- >>>; } while(i); -5 => var float f; +5 :=> var float f; do { <<< 1 -=> f >>>; } while(f > 0.0); #! do { <<< 1 -=> f >>>; } while(f > 0); -5 => f; +5 :=> f; do { <<< 1 -=> f >>>; } until(f == 0); #!do { <<< 1 -=> f >>>; } until(f == 0.0); -5 => i; +5 :=> i; do { <<< i-- >>>; } until(!i); diff --git a/tests/bug/object_string.gw b/tests/bug/object_string.gw index ba13571e..6186ba3f 100644 --- a/tests/bug/object_string.gw +++ b/tests/bug/object_string.gw @@ -1,3 +1,3 @@ var Object o; -"Object: " => var string s; +"Object: " :=> var string s; <<< s + (o + "") >>>; diff --git a/tests/bug/play_with_str.gw b/tests/bug/play_with_str.gw index 07ae0ee3..9645b371 100644 --- a/tests/bug/play_with_str.gw +++ b/tests/bug/play_with_str.gw @@ -1,4 +1,4 @@ -"lol" => var string s; -"test" => s; +"lol" :=> var string s; +"test" :=> s; <<< "testmem".replace(2, 3, "UKUH") >>>; diff --git a/tests/captures/lambda_captures.gw b/tests/captures/lambda_captures.gw index 2a8b3dd7..9f11f87c 100644 --- a/tests/captures/lambda_captures.gw +++ b/tests/captures/lambda_captures.gw @@ -1,5 +1,5 @@ #! [contains] 42 -40 => var int a; +40 :=> var int a; { \ : a : { <<< a + 2 >>>; }(); } diff --git a/tests/chuck_rewrite/chuck_rewrite.gw b/tests/chuck_rewrite/chuck_rewrite.gw index de8da997..301c3227 100644 --- a/tests/chuck_rewrite/chuck_rewrite.gw +++ b/tests/chuck_rewrite/chuck_rewrite.gw @@ -1,12 +1,12 @@ #! [contains] 42 -2 => var int i; +2 :=> var int i; fun int test() { return i; } fun int test(int tmp) { - return tmp => i; + return tmp :=> i; } <<< 40 +=> test >>>; diff --git a/tests/chuck_rewrite/chuck_rewrite_error.gw b/tests/chuck_rewrite/chuck_rewrite_error.gw index 4df0fe14..33cbda47 100644 --- a/tests/chuck_rewrite/chuck_rewrite_error.gw +++ b/tests/chuck_rewrite/chuck_rewrite_error.gw @@ -1,12 +1,12 @@ #! [contains] during rewriting operation -2 => var int i; +2 :=> var int i; fun int test() { return i; } fun int test(int tmp) { - return tmp => i; + return tmp :=> i; } <<< me +=> test >>>; diff --git a/tests/ctor/ctor_outside.gw b/tests/ctor/ctor_outside.gw index a7343cd2..08a0bdb8 100644 --- a/tests/ctor/ctor_outside.gw +++ b/tests/ctor/ctor_outside.gw @@ -1,5 +1,5 @@ #! [contains] new operator must be set inside class var int i; operator new(int arg) { - arg => i; + arg :=> i; } diff --git a/tests/ctor/ctor_overload.gw b/tests/ctor/ctor_overload.gw index 3e22ad4a..1c7c8033 100644 --- a/tests/ctor/ctor_overload.gw +++ b/tests/ctor/ctor_overload.gw @@ -2,13 +2,13 @@ class C { var int i; operator new(int arg) { - arg => i; + arg :=> i; } operator new() {} } -new C() => var auto c; -new C(2) => var auto d; +new C() :=> var auto c; +new C(2) :=> var auto d; <<< "c:${c.i}, d:${d.i}" >>>; <<< "the answer: ${(new C(42)).i}" >>>; diff --git a/tests/deep_equal/eq.gw b/tests/deep_equal/eq.gw index e432a3b2..b3c06d52 100644 --- a/tests/deep_equal/eq.gw +++ b/tests/deep_equal/eq.gw @@ -1,11 +1,11 @@ #! [contains] false struct C { - 12 => const int i; + 12 :=> const int i; } struct D { - 42 => const int i; + 42 :=> const int i; } const C c; diff --git a/tests/deep_equal/eq_fail.gw b/tests/deep_equal/eq_fail.gw index 4f4bfe4e..46bebd25 100644 --- a/tests/deep_equal/eq_fail.gw +++ b/tests/deep_equal/eq_fail.gw @@ -1,10 +1,10 @@ #! [contains] no deep operation struct C { - 12 => const int i; - 12 => const int j; + 12 :=> const int i; + 12 :=> const int j; } struct D { - 42 => const int i; + 42 :=> const int i; } var C c; diff --git a/tests/deep_equal/ne.gw b/tests/deep_equal/ne.gw index 14e9c532..904911bd 100644 --- a/tests/deep_equal/ne.gw +++ b/tests/deep_equal/ne.gw @@ -1,9 +1,9 @@ #! [contains] true struct C { - 12 => const int i; + 12 :=> const int i; } struct D { - 42 => const int i; + 42 :=> const int i; } var C c; diff --git a/tests/deep_equal/ne_fail.gw b/tests/deep_equal/ne_fail.gw index b6009545..1109ed3e 100644 --- a/tests/deep_equal/ne_fail.gw +++ b/tests/deep_equal/ne_fail.gw @@ -1,10 +1,10 @@ #! [contains] no deep operation struct C { - 12 => const int i; - 12 => const int j; + 12 :=> const int i; + 12 :=> const int j; } struct D { - 42 => const int i; + 42 :=> const int i; } var C c; diff --git a/tests/dict/dict.gw b/tests/dict/dict.gw index fbdb3b35..959995e7 100644 --- a/tests/dict/dict.gw +++ b/tests/dict/dict.gw @@ -1,7 +1,7 @@ #! [contains] 0 const Dict:[string, int] d; -0 => d["foo"]; -1 => d["bar"]; -2 => d["baz"]; +0 :=> d["foo"]; +1 :=> d["bar"]; +2 :=> d["baz"]; <<< d["foo"] >>>; diff --git a/tests/dict/dict_noleak.gw b/tests/dict/dict_noleak.gw index b3fedb69..164953a1 100644 --- a/tests/dict/dict_noleak.gw +++ b/tests/dict/dict_noleak.gw @@ -1,5 +1,5 @@ #! ensure no leaks const Dict:[string, Event] d; -new Object => d["foo"]; -new Object => d["bar"]; -new Object => d["baz"]; +new Object :=> d["foo"]; +new Object :=> d["bar"]; +new Object :=> d["baz"]; diff --git a/tests/dict/dict_remove.gw b/tests/dict/dict_remove.gw index ddecbcda..24aa2fcc 100644 --- a/tests/dict/dict_remove.gw +++ b/tests/dict/dict_remove.gw @@ -1,8 +1,8 @@ #! [contains] InvalidMapAccess const Dict:[string, int] d; -0 => d["foo"]; -1 => d["bar"]; -2 => d["baz"]; +0 :=> d["foo"]; +1 :=> d["bar"]; +2 :=> d["baz"]; #! could be "foo" ~~ d <<< d.remove("foo") >>>; diff --git a/tests/effects/funptr_eff.gw b/tests/effects/funptr_eff.gw index d63774a0..d6d7228a 100644 --- a/tests/effects/funptr_eff.gw +++ b/tests/effects/funptr_eff.gw @@ -6,5 +6,5 @@ fun void myfunc(int i) { perform Test; } -myfunc @=> const test_t t; +myfunc :=> const test_t t; t(2); diff --git a/tests/effects/try.gw b/tests/effects/try.gw index ee1cd7fa..2c278ca9 100644 --- a/tests/effects/try.gw +++ b/tests/effects/try.gw @@ -1,11 +1,11 @@ #! [contains] value of i at the end 42 -0 => var auto i; +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" >>>; + <<< "set i to ${ 42 :=> i } and resume" >>>; retry; } <<< "value of i at the end ${i}" >>>; diff --git a/tests/error/array_assign_exp.gw b/tests/error/array_assign_exp.gw index e0c61279..e73d51bc 100644 --- a/tests/error/array_assign_exp.gw +++ b/tests/error/array_assign_exp.gw @@ -1,2 +1,2 @@ #! [contains] do not provide array -[1,2,3,4] => var int[1] loop; +[1,2,3,4] :=> var int[1] loop; diff --git a/tests/error/array_depth_match.gw b/tests/error/array_depth_match.gw index 3d44cd75..ecac14b7 100644 --- a/tests/error/array_depth_match.gw +++ b/tests/error/array_depth_match.gw @@ -1,2 +1,2 @@ #! [contains] array depths do not match -[1,2,3,4] => var int[1][1] k; +[1,2,3,4] :=> var int[1][1] k; diff --git a/tests/error/array_mutable.gw b/tests/error/array_mutable.gw index e20aee66..f69954c6 100644 --- a/tests/error/array_mutable.gw +++ b/tests/error/array_mutable.gw @@ -1,2 +1,2 @@ #! [contains] non-mutable -[1,2,3,4] => [1][1]; +[1,2,3,4] :=> [1][1]; diff --git a/tests/error/array_type_match.gw b/tests/error/array_type_match.gw index 37cc9678..a7a2860a 100644 --- a/tests/error/array_type_match.gw +++ b/tests/error/array_type_match.gw @@ -1,2 +1,2 @@ #! [contains] array types do not match -[1,2,3,4] => var Object[1] k; +[1,2,3,4] :=> var Object[1] k; diff --git a/tests/error/const_arg.gw b/tests/error/const_arg.gw index 916fdacd..69ff4a8b 100644 --- a/tests/error/const_arg.gw +++ b/tests/error/const_arg.gw @@ -1,6 +1,6 @@ #! [contains] right-side operand is non-mutable fun void test(const int i) { - 10 => i; + 10 :=> i; } test(2); diff --git a/tests/error/const_non_mutable.gw b/tests/error/const_non_mutable.gw index d7b32ef3..2baea3d9 100644 --- a/tests/error/const_non_mutable.gw +++ b/tests/error/const_non_mutable.gw @@ -1,4 +1,4 @@ #! [contains] right-side operand is non-mutable -10 => const int i; -12 => i; +10 :=> const int i; +12 :=> i; <<< i >>>; diff --git a/tests/error/error.gw b/tests/error/error.gw index f38df732..66a21de1 100644 --- a/tests/error/error.gw +++ b/tests/error/error.gw @@ -1,4 +1,4 @@ #! [contains] right-side operand is non-mutable const int i; -12 => i; +12 :=> i; diff --git a/tests/error/implicit_inside.gw b/tests/error/implicit_inside.gw index d41ff93b..4dc4f213 100644 --- a/tests/error/implicit_inside.gw +++ b/tests/error/implicit_inside.gw @@ -1,6 +1,6 @@ #! [contains] while defining class C { - 0 => var int i; + 0 :=> var int i; } operator int @implicit (C c) { return c; diff --git a/tests/error/invalid_array_acces.gw b/tests/error/invalid_array_acces.gw index 86ee14e4..05261dfb 100644 --- a/tests/error/invalid_array_acces.gw +++ b/tests/error/invalid_array_acces.gw @@ -1,3 +1,3 @@ #! [contains] invalid array access expression var int[2] j; -j[1,2,3,4] => i; +j[1,2,3,4] :=> i; diff --git a/tests/error/op_test.gw b/tests/error/op_test.gw index 1dedd93e..2c4a1a8e 100644 --- a/tests/error/op_test.gw +++ b/tests/error/op_test.gw @@ -6,4 +6,4 @@ class C var C[1] c; var C[2][4]d; -c :=> d; +c ~=> d; diff --git a/tests/error/ptr_no_match.gw b/tests/error/ptr_no_match.gw index f77ed4fc..8286cf62 100644 --- a/tests/error/ptr_no_match.gw +++ b/tests/error/ptr_no_match.gw @@ -4,4 +4,4 @@ fun void test(float f){} funptr void Test(); var Test t; -test @=> t; +test :=> t; diff --git a/tests/error/right_mutable.gw b/tests/error/right_mutable.gw index af135749..821060ec 100644 --- a/tests/error/right_mutable.gw +++ b/tests/error/right_mutable.gw @@ -1,2 +1,2 @@ #! [contains] right-side operand is non-mutable - 2 => 1; +2 :=> 1; diff --git a/tests/error/typedef_func_tmpl_types.gw b/tests/error/typedef_func_tmpl_types.gw index d94e552a..6b2f0c42 100644 --- a/tests/error/typedef_func_tmpl_types.gw +++ b/tests/error/typedef_func_tmpl_types.gw @@ -8,7 +8,7 @@ fun void test:[A]() { <<< __func__, " ", a>>>; } -test @=> iptr; +test :=> iptr; <<< iptr() >>>; <<< iptr:[int]() >>>; <<< iptr:[float]() >>>; diff --git a/tests/error/typedef_func_tmpl_types2.gw b/tests/error/typedef_func_tmpl_types2.gw index 927541c1..1056bc61 100644 --- a/tests/error/typedef_func_tmpl_types2.gw +++ b/tests/error/typedef_func_tmpl_types2.gw @@ -6,6 +6,6 @@ fun void test:[A]() { <<< __func__ >>>; } -test @=> var B b; +test :=> var B b; <<< b() >>>; <<< b:[float]() >>>; diff --git a/tests/fork/fork_join2.gw b/tests/fork/fork_join2.gw index 05af271a..9502b6fc 100644 --- a/tests/fork/fork_join2.gw +++ b/tests/fork/fork_join2.gw @@ -1,2 +1,2 @@ -fork { <<< __func__ >>>; minute => now; } => var Fork f; +fork { <<< __func__ >>>; minute => now; } :=> var Fork f; f.join(); diff --git a/tests/fptr/class_ptr1.gw b/tests/fptr/class_ptr1.gw index 5a3f1332..e03b6d79 100644 --- a/tests/fptr/class_ptr1.gw +++ b/tests/fptr/class_ptr1.gw @@ -1,10 +1,10 @@ class C { fun void test(int i) { <<< "int arg" >>>; } funptr static void PtrType(int i); - test @=> + test :=> var PtrType p; p(1); - test @=> p; + test :=> p; p(1); } diff --git a/tests/fptr/class_ptr2.gw b/tests/fptr/class_ptr2.gw index 4b707490..278cde07 100644 --- a/tests/fptr/class_ptr2.gw +++ b/tests/fptr/class_ptr2.gw @@ -1,9 +1,9 @@ class C { fun void test(int i) { <<< "int arg" >>>; } funptr void PtrType(int i); - test @=> var static PtrType p; + test :=> var static PtrType p; p(1); - test @=> p; + test :=> p; p(1); } diff --git a/tests/fptr/class_ptr3.gw b/tests/fptr/class_ptr3.gw index 68e9cf55..eecbb5ed 100644 --- a/tests/fptr/class_ptr3.gw +++ b/tests/fptr/class_ptr3.gw @@ -1,9 +1,9 @@ class C { fun static void test(int i) { <<< "int arg" >>>; } funptr static void PtrType(int i); - test @=> var static PtrType p; + test :=> var static PtrType p; p(1); - test @=> p; + test :=> p; p(1); } diff --git a/tests/fptr/fptr_class_type.gw b/tests/fptr/fptr_class_type.gw index 754ff775..7ab795fc 100644 --- a/tests/fptr/fptr_class_type.gw +++ b/tests/fptr/fptr_class_type.gw @@ -1,2 +1,2 @@ funptr void ptr_t(); -var ptr_t t @=> var ptr_t t2; +var ptr_t t :=> var ptr_t t2; diff --git a/tests/fptr/generated.gw b/tests/fptr/generated.gw index 80226ebb..0b149c11 100644 --- a/tests/fptr/generated.gw +++ b/tests/fptr/generated.gw @@ -1,4 +1,4 @@ #! [contains] Hello, generated function pointer! fun void test() { <<< "Hello, generated function pointer!" >>>; } -test @=> var auto p; +test :=> var auto p; p(); diff --git a/tests/functionnal_array/concatmap.gw b/tests/functionnal_array/concatmap.gw index 70b40a9a..c4715300 100644 --- a/tests/functionnal_array/concatmap.gw +++ b/tests/functionnal_array/concatmap.gw @@ -4,26 +4,26 @@ #!- this also const float ii; -123=> var float f; +123 :=> var float f; foreach(a : [12, 1, 2 ,3].compactMap:[int]( \a { var int?i; - 145 => i.val; + 145 :=> i.val; if(maybe) i.val++; return i; } )) { - <<< "mapped to => ${a}" >>>; + <<< "mapped to :=> ${a}" >>>; } fun int? t(int x) { var int?i; - 145 => i.val; + 145 :=> i.val; if(maybe) i.val++; return i; } foreach(a : [12, 1, 2 ,3].compactMap:[int](t)) - <<< "mapped to => ${a}" >>>; + <<< "mapped to :=> ${a}" >>>; <<< "test" >>>; diff --git a/tests/functionnal_array/map.gw b/tests/functionnal_array/map.gw index c323decf..b0dc423c 100644 --- a/tests/functionnal_array/map.gw +++ b/tests/functionnal_array/map.gw @@ -1,13 +1,13 @@ fun float t(float i) { return 2; } foreach(a : [12., 1, 2 ,3].map:[float](t)) - <<< "mapped to => ${a}" >>>; + <<< "mapped to :=> ${a}" >>>; #!foreach(a : [12, 1, 2 ,3].map:[int](t)) -#! <<< "mapped to => ${a}" >>>; +#! <<< "mapped to :=> ${a}" >>>; #!foreach(a : [12, 1, 2 ,3].map:[int](t)) -#! <<< "mapped to => ${a}" >>>; +#! <<< "mapped to :=> ${a}" >>>; #!foreach(a : [12, 1, 2 ,3].map:[int](t)) -#! <<< "mapped to => ${a}" >>>; -#!foreach(a : [12, 1, 2 ,3].map:[int]( \a {145 => a;return 2;})) -#! <<< "mapped to => ${a}" >>>; -#!foreach(a : [12, 1, 2 ,3].map:[int]( \a {145 => a;return 2;})) -#! <<< "mapped to => ${a}" >>>; +#! <<< "mapped to :=> ${a}" >>>; +#!foreach(a : [12, 1, 2 ,3].map:[int]( \a {145 :=> a;return 2;})) +#! <<< "mapped to :=> ${a}" >>>; +#!foreach(a : [12, 1, 2 ,3].map:[int]( \a {145 :=> a;return 2;})) +#! <<< "mapped to :=> ${a}" >>>; diff --git a/tests/internal_op/conditionnal.gw b/tests/internal_op/conditionnal.gw index ede8d2a8..c370ae1b 100644 --- a/tests/internal_op/conditionnal.gw +++ b/tests/internal_op/conditionnal.gw @@ -1,7 +1,7 @@ #! [skip] Do to a window bug #! was #! [contains] 1 class C { - 10 => var int i; + 10 :=> var int i; } operator int @conditional (C c) { diff --git a/tests/internal_op/implicit.gw b/tests/internal_op/implicit.gw index 57d35676..c7d6daba 100644 --- a/tests/internal_op/implicit.gw +++ b/tests/internal_op/implicit.gw @@ -1,6 +1,6 @@ #! [contains] 12 class C { - 12 => var int i; + 12 :=> var int i; } operator int @implicit (C c) { diff --git a/tests/internal_op/unconditionnal.gw b/tests/internal_op/unconditionnal.gw index 3c0c6162..05dfd35b 100644 --- a/tests/internal_op/unconditionnal.gw +++ b/tests/internal_op/unconditionnal.gw @@ -1,7 +1,7 @@ #! [skip] due to a window bug #! was #! [contains] 1 class C { - 10 => var int i; + 10 :=> var int i; } operator int @unconditional (C c) { diff --git a/tests/interp/exp.gw b/tests/interp/exp.gw index 48e267f9..58e59a65 100644 --- a/tests/interp/exp.gw +++ b/tests/interp/exp.gw @@ -1,3 +1,3 @@ #! [contains] Hello, interpolation! 1 -1 => var int my; +1 :=> var int my; <<< "Hello, interpolation! ${ my }" >>>; diff --git a/tests/interp/exp_lit.gw b/tests/interp/exp_lit.gw index aee41c61..6afa1768 100644 --- a/tests/interp/exp_lit.gw +++ b/tests/interp/exp_lit.gw @@ -1,3 +1,3 @@ #! [contains] 1 Hello, interpolation! -1 => var int my; +1 :=> var int my; <<< "${my} Hello, interpolation!" >>>; diff --git a/tests/interp/to_string.gw b/tests/interp/to_string.gw index eb827980..d410452e 100644 --- a/tests/interp/to_string.gw +++ b/tests/interp/to_string.gw @@ -1,4 +1,4 @@ #! [contains] Hello, interpolation! 1 -1 => var int my; -"Hello, interpolation! ${ my }" => var string s; +1 :=> var int my; +"Hello, interpolation! ${ my }" :=> var string s; <<< s >>>; diff --git a/tests/lambdas/lambda.gw b/tests/lambdas/lambda.gw index 32844846..eda17f70 100644 --- a/tests/lambdas/lambda.gw +++ b/tests/lambdas/lambda.gw @@ -1,9 +1,9 @@ class C { funptr void ptr_t(int i,int j); - \a b c { <<< "${a} ${b} ${c}" >>>; } @=> var ptr_t ptr; + \a b c { <<< "${a} ${b} ${c}" >>>; } :=> var ptr_t ptr; fun void test(int i, int j) { <<< this, " ", i, " ", j >>>; } } var C c; <<< c >>>; -c.test @=> c.ptr; +c.test :=> c.ptr; c.ptr(1, 2); diff --git a/tests/lambdas/lambda2.gw b/tests/lambdas/lambda2.gw index a7ddc6a7..b7137e40 100644 --- a/tests/lambdas/lambda2.gw +++ b/tests/lambdas/lambda2.gw @@ -1,12 +1,12 @@ class C { funptr void ptr_t(int i); - \a b { <<< "${a} ${b}" >>>; } @=> var ptr_t ptr; + \a b { <<< "${a} ${b}" >>>; } :=> var ptr_t ptr; fun void t1(int i) { <<< this, " t1 ", i >>>; } fun void test(ptr_t p) { <<< this >>>; p(1); } - t1 @=> var ptr_t t1p; + t1 :=> var ptr_t t1p; test(t1p); } <<< var C c >>>; diff --git a/tests/lambdas/lambda3.gw b/tests/lambdas/lambda3.gw index d3460d56..82cb4658 100644 --- a/tests/lambdas/lambda3.gw +++ b/tests/lambdas/lambda3.gw @@ -1,2 +1,2 @@ -12 => var int i; +12 :=> var int i; \a b { <<< "i: ", i, " ", a, " ", b >>>; }(1,2); diff --git a/tests/lambdas/lambda_mismatch2.gw b/tests/lambdas/lambda_mismatch2.gw index 5295561f..1d4b7aed 100644 --- a/tests/lambdas/lambda_mismatch2.gw +++ b/tests/lambdas/lambda_mismatch2.gw @@ -1,4 +1,4 @@ #! [contains] argument number does not match for lambda funptr void ptr_t(int i); -\a b { <<< a, " ", b >>>; } @=> var ptr_t ptr; +\a b { <<< a, " ", b >>>; } :=> var ptr_t ptr; ptr(2); diff --git a/tests/lambdas/lambda_mismatch3.gw b/tests/lambdas/lambda_mismatch3.gw index cabf0b0b..bcb23d50 100644 --- a/tests/lambdas/lambda_mismatch3.gw +++ b/tests/lambdas/lambda_mismatch3.gw @@ -1,6 +1,6 @@ #! [contains] argument number does not match for lambda funptr void ptr_t(int i); -\a b { <<< a, " ", b >>>; } @=> var ptr_t ptr; +\a b { <<< a, " ", b >>>; } :=> var ptr_t ptr; fun void test(ptr_t p) { p(2); } diff --git a/tests/new/class_fptr_returns_fptr.gw b/tests/new/class_fptr_returns_fptr.gw index 8f3d1b6b..63bb329b 100644 --- a/tests/new/class_fptr_returns_fptr.gw +++ b/tests/new/class_fptr_returns_fptr.gw @@ -4,8 +4,8 @@ class C { funptr void t_fptr1(int i); fun void test() { <<< this , " ", __func__ >>>;} fun void test(int i) { <<< __func__, " ", i >>>;} - test @=> var t_fptr0 ptr0; - test @=> var t_fptr1 ptr1; + test :=> var t_fptr0 ptr0; + test :=> var t_fptr1 ptr1; <<>>; spork ptr0(); me.yield(); diff --git a/tests/new/float.gw b/tests/new/float.gw index bf06c9b5..31b1d48e 100644 --- a/tests/new/float.gw +++ b/tests/new/float.gw @@ -1,5 +1,5 @@ class C { - 1 => var float f; + 1 :=> var float f; } var C c; <<< c.f >>>; diff --git a/tests/new/global_func0.gw b/tests/new/global_func0.gw index 335ee433..c559f3b0 100644 --- a/tests/new/global_func0.gw +++ b/tests/new/global_func0.gw @@ -1,10 +1,10 @@ -123 => var global int global_func_i; +123 :=> var global int global_func_i; class global GlobalFuncClass { - 13 => var int i; + 13 :=> var int i; } <<< global_func_i >>>; var global GlobalFuncClass g_c; -<<< g_c, "->i => ", g_c.i >>>; +<<< g_c, "->i :=> ", g_c.i >>>; fun global void g_test() { <<< global_func_i >>>; <<< g_c >>>; <<< g_c.i >>>; <<< "test" >>>; } #!fun global void g_test() { <<< "test" >>>; } <<< g_test >>>; diff --git a/tests/new/spork_fptr.gw b/tests/new/spork_fptr.gw index c2690aaf..ba1f4b34 100644 --- a/tests/new/spork_fptr.gw +++ b/tests/new/spork_fptr.gw @@ -1,11 +1,11 @@ class C { funptr void t_fptr(int i); fun void test(int i) { <<< this , " ", __func__, " ", i >>>;} - test @=> var t_fptr ptr; + test :=> var t_fptr ptr; } funptr void t_fptr(int i); fun void test(int i) { <<< __func__, " ", i >>>;} -test @=> var t_fptr ptr; +test :=> var t_fptr ptr; <<< ptr >>>; spork ptr(2); me.yield(); diff --git a/tests/new/spork_fptr2.gw b/tests/new/spork_fptr2.gw index 84dacb47..539a45c6 100644 --- a/tests/new/spork_fptr2.gw +++ b/tests/new/spork_fptr2.gw @@ -2,7 +2,7 @@ class C { funptr void t_fptr(int i, int); fun void test(int i, int j) { <<< this , " ", __func__, " ", i, " " , j >>>;} - test @=> var t_fptr ptr; + test :=> var t_fptr ptr; <<< this, ptr >>>; spork ptr(1,2); second => now; diff --git a/tests/new/template_class_in_template.gw b/tests/new/template_class_in_template.gw index 8db17222..fa0e43e2 100644 --- a/tests/new/template_class_in_template.gw +++ b/tests/new/template_class_in_template.gw @@ -1,7 +1,7 @@ class Parent:[A] { class C:[B] { - 12 => var A a; - 13 => var B B; + 12 :=> var A a; + 13 :=> var B B; } } var Parent:[int].C:[int] c; diff --git a/tests/new/typedef_func_class.gw b/tests/new/typedef_func_class.gw index 38c010ba..d0015f5a 100644 --- a/tests/new/typedef_func_class.gw +++ b/tests/new/typedef_func_class.gw @@ -7,7 +7,7 @@ class C { <<< this, " ", __func__ >>>; } - test @=> iptr; + test :=> iptr; <<< iptr() >>>; <<< iptr() >>>; } diff --git a/tests/new/typedef_func_tmpl_class.gw b/tests/new/typedef_func_tmpl_class.gw index 6d13f4b7..1cbdb24c 100644 --- a/tests/new/typedef_func_tmpl_class.gw +++ b/tests/new/typedef_func_tmpl_class.gw @@ -7,7 +7,7 @@ class C { <<< this, " ", __func__ >>>; } - test @=> iptr; + test :=> iptr; <<< iptr() >>>; <<< iptr() >>>; } diff --git a/tests/new/typedef_func_tmpl_class_static.gw b/tests/new/typedef_func_tmpl_class_static.gw index a5334948..ddb7db5d 100644 --- a/tests/new/typedef_func_tmpl_class_static.gw +++ b/tests/new/typedef_func_tmpl_class_static.gw @@ -7,7 +7,7 @@ class C { <<< __func__ >>>; } - test @=> iptr; + test :=> iptr; <<< iptr() >>>; <<< iptr() >>>; } diff --git a/tests/new/typedef_func_tmpl_err.gw b/tests/new/typedef_func_tmpl_err.gw index 05386ca7..802856c4 100644 --- a/tests/new/typedef_func_tmpl_err.gw +++ b/tests/new/typedef_func_tmpl_err.gw @@ -6,5 +6,5 @@ fun void test:[A]() { <<< __func_ >>>; } -test @=> ptr; +test :=> ptr; ptr:[int](); diff --git a/tests/plug/coverage.gw b/tests/plug/coverage.gw index b3430608..2ad0c6bc 100644 --- a/tests/plug/coverage.gw +++ b/tests/plug/coverage.gw @@ -14,7 +14,7 @@ c.s_i; <<< Coverage.sc_i >>>; <<< Coverage.sc_f >>>; -<<< 1 => Coverage.s_i >>>; -<<< 1.2 => Coverage.s_f >>>; +<<< 1 :=> Coverage.s_i >>>; +<<< 1.2 :=> Coverage.s_f >>>; <<< c.test_array[0][0] >>>; diff --git a/tests/plug/fptr.gw b/tests/plug/fptr.gw index 9dbb6c59..ae1732d5 100644 --- a/tests/plug/fptr.gw +++ b/tests/plug/fptr.gw @@ -2,12 +2,12 @@ fun void test(){ <<< "test" >>>; } var PtrType ptr; test(); -test @=> ptr; +test :=> ptr; ptr(); FuncTypedef.test_func(); -<<< FuncTypedef.test_func @=> FuncTypedef.ptr >>>; +<<< FuncTypedef.test_func :=> FuncTypedef.ptr >>>; var FuncTypedef.PtrType _ptr; <<< FuncTypedef.ptr >>>; FuncTypedef.ptr(); diff --git a/tests/plug/global_var.gw b/tests/plug/global_var.gw index 9cdf57c9..e03e005d 100644 --- a/tests/plug/global_var.gw +++ b/tests/plug/global_var.gw @@ -1,4 +1,4 @@ #import global_var <<< i >>>; -<<< "other test" => i >>>; -<<< 12 => f >>>; +<<< "other test" :=> i >>>; +<<< 12 :=> f >>>; diff --git a/tests/plug/struct.gw b/tests/plug/struct.gw index e0730408..48f72512 100644 --- a/tests/plug/struct.gw +++ b/tests/plug/struct.gw @@ -12,7 +12,7 @@ c.s_i; <<< Coverage.sc_i >>>; <<< Coverage.sc_f >>>; -<<< 1 => Coverage.s_i >>>; -<<< 1.2 => Coverage.s_f >>>; +<<< 1 :=> Coverage.s_i >>>; +<<< 1.2 :=> Coverage.s_f >>>; <<< c.test_array[0][0] >>>; diff --git a/tests/plug/typedef.gw b/tests/plug/typedef.gw index 49be12cc..f4e2a020 100644 --- a/tests/plug/typedef.gw +++ b/tests/plug/typedef.gw @@ -1,5 +1,5 @@ #import typedef var Typedef t; #!fun int test(int i) { <<< i >>>; } -#!test @=> t; +#!test :=> t; <<< t >>>; diff --git a/tests/plug/union.gw b/tests/plug/union.gw index 90866b2d..27568187 100644 --- a/tests/plug/union.gw +++ b/tests/plug/union.gw @@ -1,9 +1,9 @@ #import union var Union u; <<< u.i >>>; -<<< 12 => u.f >>>; -<<< 1 => u.i >>>; +<<< 12 :=> u.f >>>; +<<< 1 :=> u.i >>>; <<< u.i >>>; <<< u.f >>>; -<<< 0 => u.i >>>; -<<< null => u.o >>>; +<<< 0 :=> u.i >>>; +<<< null :=> u.o >>>; diff --git a/tests/ref/ref.gw b/tests/ref/ref.gw index a53e460b..49fbeee9 100644 --- a/tests/ref/ref.gw +++ b/tests/ref/ref.gw @@ -4,6 +4,6 @@ fun void inc(Ref:[int] a) { <<< a >>>; } -12 => var int i; +12 :=> var int i; i => inc; <<< i >>>; diff --git a/tests/slice/slice_array.gw b/tests/slice/slice_array.gw index 8534a146..98e9a2eb 100644 --- a/tests/slice/slice_array.gw +++ b/tests/slice/slice_array.gw @@ -1,4 +1,4 @@ -<<< [1,2,3] => var auto i >>>; +<<< [1,2,3] :=> var auto i >>>; <<< i[1:2] >>>; <<< i[:2] >>>; <<< i[2: -1] >>>; diff --git a/tests/string/eq.gw b/tests/string/eq.gw index 25bfe8a6..be7778bd 100644 --- a/tests/string/eq.gw +++ b/tests/string/eq.gw @@ -1,5 +1,5 @@ -"test" => var string s0; -"_test" => var string s1; +"test" :=> var string s0; +"_test" :=> var string s1; <<< s0 == s0 >>>; <<< s0 == s1 >>>; diff --git a/tests/string/erase.gw b/tests/string/erase.gw index 13df22af..f5cf67ae 100644 --- a/tests/string/erase.gw +++ b/tests/string/erase.gw @@ -1,4 +1,4 @@ -"test test" => var string s; +"test test" :=> var string s; s.erase(-1, 0); s.erase(0, -1); diff --git a/tests/string/string_access.gw b/tests/string/string_access.gw index 62dc13f8..9918155e 100644 --- a/tests/string/string_access.gw +++ b/tests/string/string_access.gw @@ -1,5 +1,5 @@ #! [contains] tezt -"test" => var string t; +"test" :=> var string t; <<< t[2] >>>; -'z' => t[2]; +'z' :=> t[2]; <<< t >>>; diff --git a/tests/struct/member_func.gw b/tests/struct/member_func.gw index 5186089b..986551f2 100644 --- a/tests/struct/member_func.gw +++ b/tests/struct/member_func.gw @@ -1,7 +1,7 @@ class C { - 1 => test; + 1 :=> test; fun int test(int i) { - 13 => var int j; + 13 :=> var int j; return j; } } diff --git a/tests/struct/struct_gack.gw b/tests/struct/struct_gack.gw index 1fae402a..2d74c3c4 100644 --- a/tests/struct/struct_gack.gw +++ b/tests/struct/struct_gack.gw @@ -1,5 +1,6 @@ + struct S { - 13 => var int i; + 13 :=> var int i; operator void @gack () { <<< "test", i >>>; } <<< this >>>; } diff --git a/tests/struct/struct_member.gw b/tests/struct/struct_member.gw index e18d19f3..6aaad1a0 100644 --- a/tests/struct/struct_member.gw +++ b/tests/struct/struct_member.gw @@ -2,8 +2,8 @@ class C { struct S { var string s; var float a; - 11 => var int i; - 13 => var float f; + 11 :=> var int i; + 13 :=> var float f; } var S s; <<< "after ctor" >>>; diff --git a/tests/struct/struct_member_func.gw b/tests/struct/struct_member_func.gw index 9e79b0e3..dc09e842 100644 --- a/tests/struct/struct_member_func.gw +++ b/tests/struct/struct_member_func.gw @@ -1,6 +1,6 @@ struct S { - 4 => var int i; - 12 => var int j; + 4 :=> var int i; + 12 :=> var int j; fun int test() { <<< "test", i >>>; } test(); } diff --git a/tests/struct/struct_noctor.gw b/tests/struct/struct_noctor.gw index 28c08fdf..c43a0c68 100644 --- a/tests/struct/struct_noctor.gw +++ b/tests/struct/struct_noctor.gw @@ -4,5 +4,5 @@ struct S { } var S s; -12.3 => s.f; +12.3 :=> s.f; s.test(); diff --git a/tests/struct/struct_return.gw b/tests/struct/struct_return.gw index 941e3423..700b214b 100644 --- a/tests/struct/struct_return.gw +++ b/tests/struct/struct_return.gw @@ -5,8 +5,8 @@ struct S { fun S test() { var S s; - 12 => s.i; - 12 => s.f; + 12 :=> s.i; + 12 :=> s.f; return s; } diff --git a/tests/struct/struct_static.gw b/tests/struct/struct_static.gw index c3269cdd..6bec5829 100644 --- a/tests/struct/struct_static.gw +++ b/tests/struct/struct_static.gw @@ -1,8 +1,8 @@ class C { struct S { - 12 => var int i; - "testing::" => var string s; - 13 => var float f; + 12 :=> var int i; + "testing::" :=> var string s; + 13 :=> var float f; <<< __func__ >>>; } var static S s; diff --git a/tests/struct/struct_static_func.gw b/tests/struct/struct_static_func.gw index a69fba1e..cf87acee 100644 --- a/tests/struct/struct_static_func.gw +++ b/tests/struct/struct_static_func.gw @@ -1,7 +1,7 @@ struct S { var int i; var int j; - 12 => var static int si; + 12 :=> var static int si; fun static void test() { <<< __func__, si >>>; } test(); } diff --git a/tests/struct/t.gw b/tests/struct/t.gw index eb1b849d..c3f15e67 100644 --- a/tests/struct/t.gw +++ b/tests/struct/t.gw @@ -4,5 +4,5 @@ struct S { var S s; <<< s.i >>>; -<<< 12 => s.i >>>; +<<< 12 :=> s.i >>>; <<< s.i >>>; diff --git a/tests/tree/array_test.gw b/tests/tree/array_test.gw index e50184b1..5d478e3f 100644 --- a/tests/tree/array_test.gw +++ b/tests/tree/array_test.gw @@ -4,7 +4,7 @@ fun void print_array(int a[]){ } var int i[5][3]; -1 => i[2][0]; +1 :=> i[2][0]; <<< i.size() >>>; <<< i.depth() >>>; diff --git a/tests/tree/assign_member_ptr.gw b/tests/tree/assign_member_ptr.gw index f861434e..b77e9d7f 100644 --- a/tests/tree/assign_member_ptr.gw +++ b/tests/tree/assign_member_ptr.gw @@ -6,4 +6,4 @@ class C } var C c; -c.func @=> c.test; +c.func :=> c.test; diff --git a/tests/tree/auto_ptr.gw b/tests/tree/auto_ptr.gw index 0da29291..8e724479 100644 --- a/tests/tree/auto_ptr.gw +++ b/tests/tree/auto_ptr.gw @@ -1,5 +1,5 @@ var int i[4]; foreach(a : i) - <<< 1 => a >>>; + <<< 1 :=> a >>>; foreach(a : i) <<< a >>>; diff --git a/tests/tree/binary.gw b/tests/tree/binary.gw index 600878a4..f21a6a1a 100644 --- a/tests/tree/binary.gw +++ b/tests/tree/binary.gw @@ -1 +1 @@ -1 => var int i; +1 :=> var int i; diff --git a/tests/tree/branch_eq_float.gw b/tests/tree/branch_eq_float.gw index 96365d4b..62e29491 100644 --- a/tests/tree/branch_eq_float.gw +++ b/tests/tree/branch_eq_float.gw @@ -5,6 +5,6 @@ else <<< "ok" >>>; while(f) <<< "not ok" >>>; -1 => f; +1 :=> f; do { <<< "test" >>>; } until(f); diff --git a/tests/tree/char.gw b/tests/tree/char.gw index df48bdfb..755d24d2 100644 --- a/tests/tree/char.gw +++ b/tests/tree/char.gw @@ -1,3 +1,3 @@ #! [contains] a -'a' => var char c; +'a' :=> var char c; <<< c >>>; diff --git a/tests/tree/class_binary.gw b/tests/tree/class_binary.gw index 63512f8f..8cfbda81 100644 --- a/tests/tree/class_binary.gw +++ b/tests/tree/class_binary.gw @@ -1,4 +1,4 @@ class C { - 1 => var int i; + 1 :=> var int i; } diff --git a/tests/tree/class_dur.gw b/tests/tree/class_dur.gw index 705971cd..0d6a64f6 100644 --- a/tests/tree/class_dur.gw +++ b/tests/tree/class_dur.gw @@ -3,7 +3,7 @@ class C { minute; 5::samp; var float f; - 2.4 => f; + 2.4 :=> f; f ::samp => now; } diff --git a/tests/tree/class_until.gw b/tests/tree/class_until.gw index f769577f..da017774 100644 --- a/tests/tree/class_until.gw +++ b/tests/tree/class_until.gw @@ -1,6 +1,6 @@ class C { var int i; - now + 1.0::samp => var time t; + now + 1.0::samp :=> var time t; until(now >= t) { i++; if(i == 3) diff --git a/tests/tree/class_while.gw b/tests/tree/class_while.gw index 9a5f26aa..c9777346 100644 --- a/tests/tree/class_while.gw +++ b/tests/tree/class_while.gw @@ -1,6 +1,6 @@ class C { var int i; - now + 3::samp => var time t; + now + 3::samp :=> var time t; while(now < t) { i++; samp => now; diff --git a/tests/tree/const.gw b/tests/tree/const.gw index 30004d1b..386c7346 100644 --- a/tests/tree/const.gw +++ b/tests/tree/const.gw @@ -1,2 +1,2 @@ -10 => const int i; +10 :=> const int i; <<< i >>>; diff --git a/tests/tree/dur.gw b/tests/tree/dur.gw index 6be45330..7e5c4c07 100644 --- a/tests/tree/dur.gw +++ b/tests/tree/dur.gw @@ -2,5 +2,5 @@ samp; minute; 5::samp; var float f; -2.4 => f; +2.4 :=> f; f ::samp => now; diff --git a/tests/tree/dur_exp.gw b/tests/tree/dur_exp.gw index ece289c2..8ebf3752 100644 --- a/tests/tree/dur_exp.gw +++ b/tests/tree/dur_exp.gw @@ -1,2 +1,2 @@ -second => var dur d; +second :=> var dur d; 2.3::d; diff --git a/tests/tree/f2i_cast.gw b/tests/tree/f2i_cast.gw index f1f25903..a5f1a648 100644 --- a/tests/tree/f2i_cast.gw +++ b/tests/tree/f2i_cast.gw @@ -1,5 +1,5 @@ <<< "test" >>>; <<< 2.3 $ int >>>; -1 => var float f; +1 :=> var float f; fun void test(float _f){} 1 => test; diff --git a/tests/tree/fptr_class.gw b/tests/tree/fptr_class.gw index 711ac8d3..ca92e02b 100644 --- a/tests/tree/fptr_class.gw +++ b/tests/tree/fptr_class.gw @@ -1,9 +1,9 @@ class C { fun void test(int i) { <<< "int arg" >>>; } funptr void ptr_t(int i); - test @=> var ptr_t p; + test :=> var ptr_t p; p(1); - test @=> p; + test :=> p; p(1); } diff --git a/tests/tree/new.gw b/tests/tree/new.gw index 439ddd55..ffd50a20 100644 --- a/tests/tree/new.gw +++ b/tests/tree/new.gw @@ -1,7 +1,7 @@ new Object; -new Object => var Object refref; +new Object :=> var Object refref; new Event; var Event ev; -ev => var Event e; -new Event => e; -ev => e; +ev :=> var Event e; +new Event :=> e; +ev :=> e; diff --git a/tests/tree/protect.gw b/tests/tree/protect.gw index 06085bc2..e9d579c7 100644 --- a/tests/tree/protect.gw +++ b/tests/tree/protect.gw @@ -6,5 +6,5 @@ class C { var C c; <<< c.i >>>; #!<<< ++c.i >>>; -#!1 => c.i; +#!1 :=> c.i; 2 +=> c.i; diff --git a/tests/tree/ptr_decl_assign.gw b/tests/tree/ptr_decl_assign.gw index a7db713d..e21bcf84 100644 --- a/tests/tree/ptr_decl_assign.gw +++ b/tests/tree/ptr_decl_assign.gw @@ -1,4 +1,4 @@ funptr void Test(); fun void t(){<<< "lol" >>>;} -t @=> var Test test; +t :=> var Test test; test(); diff --git a/tests/tree/ptr_test.gw b/tests/tree/ptr_test.gw index b369f7ec..6b737f4c 100644 --- a/tests/tree/ptr_test.gw +++ b/tests/tree/ptr_test.gw @@ -1,4 +1,4 @@ funptr void Test(); fun void t0(){} -t0 @=> var Test test; +t0 :=> var Test test; test(); diff --git a/tests/tree/return_void.gw b/tests/tree/return_void.gw index bc96ee04..1ca6951d 100644 --- a/tests/tree/return_void.gw +++ b/tests/tree/return_void.gw @@ -3,7 +3,7 @@ var int i; #! define a funs that returns 1 if 'i' is non zero, and 0 othervise. fun int test() { return i ? 1 : 0; } <<< test() >>>; -1 => i; +1 :=> i; <<< test() >>>; -2 => i; +2 :=> i; <<< test() >>>; diff --git a/tests/tree/shredule_test.gw b/tests/tree/shredule_test.gw index 9b2d5a07..d9a9aec9 100644 --- a/tests/tree/shredule_test.gw +++ b/tests/tree/shredule_test.gw @@ -2,8 +2,8 @@ var Event e; spork { e => now; }; spork { samp => now; 4::samp => now;}; -spork { 5::samp => now;} => var Shred s; -spork { samp => now; 4::samp => now; } => var Shred t; +spork { 5::samp => now;} :=> var Shred s; +spork { samp => now; 4::samp => now; } :=> var Shred t; spork { 2::samp => now; me.exit(); }; spork { new Object; <<< "garbage collect me" >>>; 3::samp => now; }; 2::samp => now; diff --git a/tests/tree/simple_assign.gw b/tests/tree/simple_assign.gw index 7f3a1715..4f932252 100644 --- a/tests/tree/simple_assign.gw +++ b/tests/tree/simple_assign.gw @@ -1,2 +1,2 @@ -12 => var int i; +12 :=> var int i; <<< i >>>; diff --git a/tests/tree/template_fptr.gw b/tests/tree/template_fptr.gw index fbf17de8..395924f0 100644 --- a/tests/tree/template_fptr.gw +++ b/tests/tree/template_fptr.gw @@ -3,7 +3,7 @@ var ptr_t ptr; <<>>; fun int test:[A](A a) { <<< a >>>; } -test @=> ptr; +test :=> ptr; <<< ptr >>>; ptr:[int](2); ptr:[float](2.3); diff --git a/tests/tree/typedef_func.gw b/tests/tree/typedef_func.gw index 973e6150..302a4426 100644 --- a/tests/tree/typedef_func.gw +++ b/tests/tree/typedef_func.gw @@ -4,5 +4,5 @@ var A a; <<>>; fun void test(int i) { <<< __func__ , " ", i>>>; } -test @=> a; +test :=> a; a(1); diff --git a/tests/tree/typedef_func_class.gw b/tests/tree/typedef_func_class.gw index cf9cced0..b275268f 100644 --- a/tests/tree/typedef_func_class.gw +++ b/tests/tree/typedef_func_class.gw @@ -5,7 +5,7 @@ var A a; <<>>; fun void test() { <<< __func__ >>>; } -test @=> a; +test :=> a; a(); a(); a(); diff --git a/tests/tree/typedef_func_tmpl.gw b/tests/tree/typedef_func_tmpl.gw index b7f52412..ded08c77 100644 --- a/tests/tree/typedef_func_tmpl.gw +++ b/tests/tree/typedef_func_tmpl.gw @@ -7,8 +7,8 @@ fun void test:[A]() { <<< __func__ >>>; } -test @=> iptr; -test @=> fptr; +test :=> iptr; +test :=> fptr; <<< iptr() >>>; <<< iptr() >>>; diff --git a/tests/tree/typedef_func_tmpl2.gw b/tests/tree/typedef_func_tmpl2.gw index 6c294ce4..0691e9ab 100644 --- a/tests/tree/typedef_func_tmpl2.gw +++ b/tests/tree/typedef_func_tmpl2.gw @@ -6,7 +6,7 @@ fun void test:[A]() { typedef t_ptr:[int] B; var B b; <<< b >>>; -test @=> b; +test :=> b; <<< b >>>; <<< b() >>>; <<< b() >>>; @@ -15,7 +15,7 @@ test @=> b; typedef t_ptr:[float] C; var C c; <<< c >>>; -test @=> c; +test :=> c; <<< c >>>; <<< c() >>>; <<< c() >>>; diff --git a/tests/tree/typedef_func_tmpl_class.gw b/tests/tree/typedef_func_tmpl_class.gw index 500f8069..1d81f7b6 100644 --- a/tests/tree/typedef_func_tmpl_class.gw +++ b/tests/tree/typedef_func_tmpl_class.gw @@ -7,7 +7,7 @@ class C { <<< this, " ", __func__ >>>; } - test @=> iptr; + test :=> iptr; <<< iptr() >>>; #! <<< iptr() >>>; } diff --git a/tests/tree/until.gw b/tests/tree/until.gw index 2b9a23ae..353abaaf 100644 --- a/tests/tree/until.gw +++ b/tests/tree/until.gw @@ -1,5 +1,5 @@ var int i; -now + 1.0::samp => var time t; +now + 1.0::samp :=> var time t; until(now >= t) { i++; if(i == 3) diff --git a/tests/tree/var_from_parent.gw b/tests/tree/var_from_parent.gw index 79be61d0..fe19bb5d 100644 --- a/tests/tree/var_from_parent.gw +++ b/tests/tree/var_from_parent.gw @@ -8,7 +8,7 @@ class UncleClass { var string name; class ChildClass extends ParentClass { - "Gotcha!" => name; + "Gotcha!" :=> name; } } diff --git a/tests/tree/while.gw b/tests/tree/while.gw index b252a4fc..8f2eaca0 100644 --- a/tests/tree/while.gw +++ b/tests/tree/while.gw @@ -1,5 +1,5 @@ var int i; -now + 3::samp => var time t; +now + 3::samp :=> var time t; while(now < t) { i++; samp => now; diff --git a/tests/union/none.gw b/tests/union/none.gw index 3ee84d78..be16a3b3 100644 --- a/tests/union/none.gw +++ b/tests/union/none.gw @@ -1,2 +1,2 @@ #! [contains] right-side operand is non-mutable -None => None; +None :=> None; diff --git a/tests/union/option.gw b/tests/union/option.gw index d5c1c564..d073155a 100644 --- a/tests/union/option.gw +++ b/tests/union/option.gw @@ -1,4 +1,4 @@ #! [contains] 12 var int? i; -<<< 12 => i.val >>>; +<<< 12 :=> i.val >>>; <<< i.val >>>; diff --git a/tests/union/option_check.gw b/tests/union/option_check.gw index b9a7d59f..73e5dd66 100644 --- a/tests/union/option_check.gw +++ b/tests/union/option_check.gw @@ -1,6 +1,6 @@ #! [contains] val: 12 var int? i; -12 => i.val; +12 :=> i.val; if(i.is(val)) <<< "val: ${i.val}" >>>; diff --git a/tests/union/union.gw b/tests/union/union.gw index 37833f4d..b03c25e4 100644 --- a/tests/union/union.gw +++ b/tests/union/union.gw @@ -4,9 +4,9 @@ union U { float f; } -new U(i, 1) => var U u; +new U(i, 1) :=> var U u; <<< u.i >>>; -2.4 => u.f; +2.4 :=> u.f; <<< u.f >>>; -- 2.43.0