From 68d7f53bb10905afd8992350f432439c618e5f1c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Fri, 11 Sep 2020 17:49:08 +0200 Subject: [PATCH] :art: Introduce var syntax --- ast | 2 +- examples/Gain.gw | 4 +- examples/array_lit.gw | 16 +- examples/array_multiple.gw | 8 +- examples/auto.gw | 2 +- examples/binary_tmpl.gw | 2 +- examples/class.gw | 6 +- examples/class_coverage.gw | 8 +- examples/class_enum.gw | 2 +- examples/class_func_pointer.gw | 4 +- examples/class_spork_exp.gw | 10 +- examples/class_spork_func.gw | 2 +- examples/complex/event.gw | 2 +- examples/complex/event2_1.gw | 2 +- examples/complex/invalid_type0.gw | 2 +- examples/complex/invalid_type1.gw | 2 +- examples/const_prop.gw | 4 +- examples/decl.gw | 2 +- examples/decl_object.gw | 2 +- examples/decl_object2.gw | 2 +- examples/do_until.gw | 4 +- examples/dtor.gw | 4 +- examples/empty_string.gw | 2 +- examples/event.gw | 2 +- examples/event_signal.gw | 2 +- examples/extend_array_type_decl.gw | 4 +- examples/float.gw | 210 ++++---- examples/fullrect.gw | 2 +- examples/func_pointer.gw | 2 +- examples/func_ptr.gw | 2 +- examples/halfrect.gw | 2 +- examples/implicit_fptr_class.gw | 4 +- examples/implicit_ptr.gw | 2 +- examples/impulse.gw | 2 +- examples/in_class_class.gw | 10 +- examples/int.gw | 136 +++-- examples/member.gw | 8 +- examples/member_func.gw | 2 +- examples/module_coverage.gw | 8 +- examples/object_string.gw | 4 +- examples/op.gw | 8 +- examples/op2.gw | 10 +- examples/postfix.gw | 2 +- examples/ptr_assign.gw | 4 +- examples/ptr_assign_class.gw | 4 +- examples/ptr_cast.gw | 2 +- examples/ptr_deref.gw | 4 +- examples/shred.gw | 2 +- examples/sine.gw | 2 +- examples/sine2.gw | 2 +- examples/sinosc_extend.gw | 2 +- examples/spork_exp.gw | 10 +- examples/spork_func.gw | 2 +- examples/static.gw | 6 +- examples/step.gw | 2 +- examples/string.gw | 2 +- examples/template.gw | 4 +- examples/template_dyn.gw | 6 +- examples/trig.gw | 2 +- examples/typedef_array_extend.gw | 2 +- examples/typeof_array.gw | 2 +- examples/typeof_decl.gw | 4 +- examples/ugen_connect_no_in.gw | 2 +- examples/ugen_disconnect_no_in.gw | 4 +- examples/usr_postfix.gw | 7 +- examples/vararg.gw | 2 +- examples/zerox.gw | 2 +- plug | 2 +- tests/UsrUgen/UsrUGen.gw | 2 +- tests/UsrUgen/UsrUGen_more_arg.gw | 2 +- tests/UsrUgen/UsrUGen_no_arg.gw | 2 +- tests/UsrUgen/UsrUGen_no_float.gw | 2 +- tests/UsrUgen/UsrUGen_ret_no_float.gw | 2 +- tests/UsrUgen/null_tick.gw | 2 +- tests/bug/Tester.gw | 16 +- tests/bug/array.gw | 6 +- tests/bug/class_doc.gw | 2 +- tests/bug/do_until.gw | 4 +- tests/bug/do_while.gw | 4 +- tests/bug/dot_member_func.gw | 6 +- tests/bug/float.gw | 489 ------------------ tests/bug/float2.gw | 82 --- tests/bug/object_string.gw | 4 +- tests/bug/play_with_str.gw | 2 +- tests/bug/static_data.gw | 6 +- tests/bug/ugen.gw | 6 +- tests/error/0_size_variable.gw | 2 +- tests/error/UgenConnectException.gw | 2 +- tests/error/abstract.gw | 2 +- tests/error/already_parent.gw | 4 +- tests/error/array_assign_exp.gw | 2 +- tests/error/array_depth_match.gw | 2 +- tests/error/array_err2.gw | 2 +- tests/error/array_err3.gw | 2 +- tests/error/array_excess.gw | 2 +- tests/error/array_failure.gw | 2 +- tests/error/array_multi_except.gw | 2 +- tests/error/array_multi_oob.gw | 2 +- tests/error/array_no_member.gw | 2 +- tests/error/array_oob.gw | 2 +- tests/error/array_oob_multi.gw | 2 +- tests/error/array_ref_exp.gw | 2 +- tests/error/array_type_match.gw | 2 +- tests/error/auto_fail.gw | 2 +- tests/error/auto_not_array.gw | 2 +- tests/error/cant_find_in_nspc.gw | 8 +- tests/error/cant_infer.gw | 2 +- tests/error/class_inside.gw | 2 +- tests/error/conflict_super.gw | 3 +- tests/error/connect_except.gw | 2 +- tests/error/defined_class.gw | 2 +- tests/error/empty_for.gw | 2 +- tests/error/empty_member_ptr.gw | 4 +- tests/error/empty_obj_data.gw | 4 +- tests/error/empty_ptr.gw | 2 +- tests/error/enum_declared.gw | 2 +- tests/error/ev.gw | 2 +- tests/error/fail_assign.gw | 2 +- tests/error/find_type.gw | 2 +- tests/error/fptr_other_class.gw | 2 +- tests/error/func_arg_unknown.gw | 2 +- tests/error/func_error_scan2.gw | 2 +- tests/error/func_non.gw | 2 +- tests/error/func_ptr_empty.gw | 2 +- tests/error/func_ret_array_empty.gw | 2 +- tests/error/func_unknown_ret.gw | 2 +- tests/error/function_arg_no_size.gw | 2 +- tests/error/function_nested.gw | 5 +- tests/error/function_used.gw | 2 +- tests/error/implicit_inside.gw | 11 +- tests/error/invalid_array_acces.gw | 2 +- tests/error/invalid_array_shift.gw | 2 +- tests/error/invalid_cast.gw | 2 +- tests/error/invalid_global_class.gw | 2 +- tests/error/invalid_global_file.gw | 2 +- tests/error/lambda_mismatch2.gw | 2 +- tests/error/lambda_mismatch3.gw | 2 +- tests/error/member_from_static.gw | 2 +- tests/error/multi_decl.gw | 2 +- tests/error/name_conflict.gw | 2 +- tests/error/negative_array.gw | 2 +- tests/error/negative_array2.gw | 2 +- tests/error/no_cast.gw | 4 +- tests/error/no_member.gw | 4 +- tests/error/no_namespace.gw | 2 +- tests/error/non_function_template.gw | 2 +- .../error/non_public_typedef_global_scope.gw | 2 +- tests/error/non_static_from_member.gw | 2 +- tests/error/nonnull_class_extend.gw | 2 +- tests/error/not_global.gw | 2 +- tests/error/null_array_access.gw | 2 +- tests/error/null_array_access_multi.gw | 2 +- tests/error/null_auto.gw | 2 +- tests/error/op_match.gw | 2 +- tests/error/op_test.gw | 4 +- tests/error/override_confict.gw | 8 +- tests/error/postfix_no_match.gw | 2 +- tests/error/private.gw | 4 +- tests/error/private_func_call_out.gw | 2 +- tests/error/private_func_nocall_out.gw | 2 +- tests/error/private_global.gw | 2 +- tests/error/private_other.gw | 4 +- tests/error/private_type_err.gw | 2 +- tests/error/protect_type_err.gw | 2 +- tests/error/ptr_assign_const.gw | 2 +- tests/error/ptr_assign_global.gw | 4 +- tests/error/ptr_assign_invalid.gw | 4 +- tests/error/ptr_assign_member.gw | 4 +- tests/error/ptr_assign_other.gw | 6 +- tests/error/ptr_defined.gw | 2 +- tests/error/ptr_from_const.gw | 2 +- tests/error/ptr_no_match.gw | 2 +- tests/error/recursive_class_def.gw | 10 +- tests/error/spork_non_func.gw | 2 +- tests/error/static_out.gw | 2 +- tests/error/template_class_no_type.gw | 4 +- tests/error/template_dyn2.gw | 6 +- tests/error/template_no_match.gw | 2 +- tests/error/type_not_template.gw | 2 +- tests/error/type_path_test.gw | 2 +- tests/error/typedef_func_tmpl_types.gw | 4 +- tests/error/typedef_func_tmpl_types2.gw | 2 +- tests/error/typeof_error.gw | 2 +- tests/error/unary_times.gw | 2 +- tests/error/undef_parent.gw | 4 +- tests/error/union.gw | 2 +- tests/error/unknown_type.gw | 2 +- tests/error/var_defined.gw | 4 +- tests/error/without_instance.gw | 2 +- tests/fork/fork.gw | 2 +- tests/fork/fork_call.gw | 2 +- tests/fork/fork_join.gw | 2 +- tests/fork/fork_join2.gw | 2 +- tests/fptr/class_ptr01.gw | 4 +- tests/fptr/class_ptr1.gw | 5 +- tests/fptr/class_ptr2.gw | 5 +- tests/fptr/class_ptr3.gw | 5 +- tests/fptr/class_ptr31.gw | 5 +- tests/fptr/fptr_class_type.gw | 2 +- tests/fptr/generated.gw | 2 +- tests/import/callback2.gw | 2 +- tests/import/class_template.gw | 2 +- tests/import/coverage.gw | 4 +- tests/import/extend_array.gw | 2 +- tests/import/fptr.gw | 4 +- tests/import/map2.gw | 2 +- tests/import/trig.gw | 4 +- tests/import/typedef.gw | 2 +- tests/import/union.gw | 2 +- tests/import/union_tmpl.gw | 2 +- tests/import/variadic.gw | 4 +- tests/internal_op/cast_similar.gw | 2 +- tests/internal_op/conditionnal.gw | 6 +- tests/internal_op/implicit.gw | 4 +- tests/internal_op/implicit_similar.gw | 2 +- tests/internal_op/internal_gack.gw | 2 +- tests/internal_op/unconditionnal.gw | 6 +- tests/interp/exp.gw | 2 +- tests/interp/exp_lit.gw | 2 +- tests/interp/to_string.gw | 4 +- tests/match/match_where.gw | 4 +- tests/new/class_fptr_returns_fptr.gw | 21 +- tests/new/dottmpl.gw | 5 +- tests/new/dtor.gw | 2 +- tests/new/extend_template_union.gw | 7 +- tests/new/float.gw | 4 +- tests/new/from_owner1.gw | 2 +- tests/new/from_owner2.gw | 2 +- tests/new/global_func0.gw | 6 +- tests/new/global_func1.gw | 3 - tests/new/global_var.gw | 2 +- tests/new/implicit_fptr.gw | 3 +- tests/new/int_float_minus.gw | 2 +- tests/new/invalid_decl_exp.gw | 2 +- tests/new/lambda.gw | 27 +- tests/new/lambda2.gw | 25 +- tests/new/lambda3.gw | 2 +- tests/new/noxid.gw | 2 +- tests/new/parent.gw | 6 +- tests/new/pure_member.gw | 17 +- tests/new/recursive_template.gw | 2 +- tests/new/recursive_template0.gw | 5 +- tests/new/recursive_template1.gw | 4 +- tests/new/recursive_template2.gw | 3 +- tests/new/recursive_template3.gw | 6 +- tests/new/recursive_template_test.gw | 2 +- tests/new/ref.gw | 2 +- tests/new/spork.gw | 1 - tests/new/spork2.gw | 14 +- tests/new/spork_fptr.gw | 10 +- tests/new/spork_fptr2.gw | 8 +- tests/new/spork_in_func.gw | 6 +- tests/new/stackov.gw | 4 +- tests/new/stackov2.gw | 1 - tests/new/static.gw | 11 +- tests/new/static_tmpl2.gw | 7 +- tests/new/template_class_in_template.gw | 6 +- tests/new/template_dyn.gw | 2 +- tests/new/test.gw | 4 +- tests/new/test2.gw | 4 +- tests/new/typedef_func_class.gw | 11 +- tests/new/typedef_func_class_variadic.gw | 11 +- tests/new/typedef_func_tmpl_class.gw | 11 +- tests/new/typedef_func_tmpl_class_static.gw | 11 +- tests/new/typedef_func_tmpl_err.gw | 8 +- tests/new/typedef_func_tmpl_tmpl.gw | 2 +- tests/new/typedefing_array.gw | 2 +- tests/new/typeof3.gw | 4 +- tests/new/vararg_cpy.gw | 2 +- tests/nonnull/cast_non_null.gw | 4 +- tests/nonnull/cast_non_null2.gw | 2 +- tests/nonnull/dynamic_implicit_nonnull.gw | 4 +- tests/nonnull/nonnull2nullable.gw | 2 +- tests/nonnull/nonnull_assign_nonnull.gw | 2 +- tests/nonnull/nonnull_at_nonnull.gw | 2 +- tests/nonnull/nonnull_cast_nonnull.gw | 2 +- tests/nonnull/nonnull_decl.gw | 2 +- tests/nonnull/nonnull_decl_ref_assign.gw | 2 +- tests/nonnull/nonnull_err_cast_dynamic.gw | 4 +- tests/nonnull/nonnull_err_dynamic.gw | 4 +- tests/nonnull/nonnull_err_static_cast.gw | 4 +- tests/nonnull/nonnull_impl_nonnull.gw | 4 +- tests/nonnull/nonnull_implicit_nonnull.gw | 4 +- tests/nonnull/normal_at_nonnull.gw | 2 +- tests/nonnull/normal_cast_nonnull.gw | 2 +- tests/nonnull/normal_impl_nonnull.gw | 2 +- tests/nonnull/null_at_nonnull.gw | 2 +- tests/nonnull/null_cast_nonnull.gw | 2 +- tests/nonnull/null_impl_nonnull.gw | 2 +- tests/nonnull/ref.gw | 2 +- tests/nonnull/ref_at_nonnull.gw | 2 +- tests/nonnull/ref_cast_nonnull.gw | 2 +- tests/nonnull/ref_impl_nonnull.gw | 4 +- tests/nonnull/ref_nonnull.gw | 2 +- tests/nonnull/static_implicit_nonnull.gw | 2 +- tests/nonnull/void_nonnull.gw | 2 +- tests/pp/__func__.gw | 2 +- tests/regression/invalid_template.gw | 4 +- tests/slice/slice_array.gw | 2 +- tests/string/eq.gw | 4 +- tests/string/erase.gw | 2 +- tests/struct/member_func.gw | 7 +- tests/struct/struct_gack.gw | 5 +- tests/struct/struct_global0.gw | 16 +- tests/struct/struct_global1.gw | 2 +- tests/struct/struct_member.gw | 13 +- tests/struct/struct_member_func.gw | 7 +- tests/struct/struct_noctor.gw | 4 +- tests/struct/struct_return.gw | 6 +- tests/struct/struct_static.gw | 11 +- tests/struct/struct_static_func.gw | 9 +- tests/struct/struct_template.gw | 8 +- tests/struct/t.gw | 5 +- tests/tree/array_empty.gw | 2 +- tests/tree/array_test.gw | 4 +- tests/tree/assign_member_ptr.gw | 5 +- tests/tree/ast_doc.gw | 2 +- tests/tree/auto_array.gw | 2 +- tests/tree/auto_decl.gw | 4 +- tests/tree/auto_fun.gw | 2 +- tests/tree/auto_ptr.gw | 4 +- tests/tree/auto_ref.gw | 2 +- tests/tree/balance.gw | 2 +- tests/tree/binary.gw | 2 +- tests/tree/branch_eq_float.gw | 2 +- tests/tree/call_nonnull.gw | 2 +- tests/tree/cast_array.gw | 6 +- tests/tree/cast_test.gw | 10 +- tests/tree/char.gw | 2 +- tests/tree/check_td_array.gw | 4 +- tests/tree/class_binary.gw | 2 +- tests/tree/class_cast.gw | 3 +- tests/tree/class_do_until.gw | 2 +- tests/tree/class_do_while.gw | 2 +- tests/tree/class_dot.gw | 8 +- tests/tree/class_dur.gw | 2 +- tests/tree/class_for.gw | 2 +- tests/tree/class_goto.gw | 3 +- tests/tree/class_multi_decl.gw | 2 +- tests/tree/class_multi_ref_decl.gw | 2 +- tests/tree/class_named_union.gw | 4 +- .../class_not_template_inside_template.gw | 2 +- tests/tree/class_repeat.gw | 2 +- tests/tree/class_simple_decl.gw | 2 +- tests/tree/class_simple_ref_decl.gw | 2 +- tests/tree/class_template.gw | 12 +- tests/tree/class_unary.gw | 2 +- tests/tree/class_until.gw | 4 +- tests/tree/class_while.gw | 4 +- tests/tree/comment.gw | 2 +- tests/tree/cpy_ast.gw | 13 +- tests/tree/decl_exp_array.gw | 4 +- tests/tree/did_you_mean_type.gw | 2 +- tests/tree/dot.gw | 3 +- tests/tree/dur.gw | 2 +- tests/tree/dur_exp.gw | 2 +- tests/tree/extend_typedef.gw | 2 +- tests/tree/extent_template.gw | 5 +- tests/tree/f2i_cast.gw | 2 +- tests/tree/find_in_nspc.gw | 6 +- tests/tree/find_type.gw | 5 +- tests/tree/float_if.gw | 2 +- tests/tree/for.gw | 6 +- tests/tree/for_break_continue.gw | 2 +- tests/tree/force_type.gw | 4 +- tests/tree/fptr_call_decl.gw | 2 +- tests/tree/fptr_class.gw | 6 +- tests/tree/fptr_global0.gw | 2 +- tests/tree/fptr_other_class.gw | 2 +- tests/tree/func_extend_error.gw | 2 +- tests/tree/gc1.gw | 2 +- tests/tree/get_type_name_test.gw | 2 +- tests/tree/global_func3.gw | 2 +- tests/tree/global_var.gw | 2 +- tests/tree/if_obj.gw | 2 +- tests/tree/lambda_member.gw | 4 +- tests/tree/map.gw | 2 +- tests/tree/member_op.gw | 5 +- tests/tree/multi_decl.gw | 2 +- tests/tree/multi_ref_decl.gw | 2 +- tests/tree/named_union.gw | 4 +- tests/tree/named_union_private_static.gw | 9 +- tests/tree/named_union_static.gw | 10 +- tests/tree/new.gw | 6 +- tests/tree/not_global.gw | 2 +- tests/tree/not_object.gw | 2 +- tests/tree/object_func.gw | 2 +- tests/tree/pair.gw | 2 +- tests/tree/parent_match_actual.gw | 1 + tests/tree/pre_post_inc_dec.gw | 2 +- tests/tree/private_access.gw | 8 +- tests/tree/private_func.gw | 2 +- tests/tree/protect.gw | 5 +- tests/tree/ptr_decl_assign.gw | 2 +- tests/tree/ptr_test.gw | 2 +- tests/tree/push_staticcode.gw | 2 + tests/tree/repeat.gw | 2 +- tests/tree/return_void.gw | 2 +- tests/tree/set_obj.gw | 2 +- tests/tree/shredule_test.gw | 6 +- tests/tree/simple_assign.gw | 2 +- tests/tree/simple_decl.gw | 2 +- tests/tree/simple_ref_decl.gw | 2 +- tests/tree/spork_in_func.gw | 7 +- tests/tree/spork_member.gw | 6 +- tests/tree/static_data_test.gw | 8 +- tests/tree/static_template.gw | 6 +- tests/tree/string_eq.gw | 2 +- .../template_class_invalid_type_number.gw | 3 +- tests/tree/template_class_ref.gw | 2 +- tests/tree/template_fptr.gw | 4 +- tests/tree/template_self.gw | 4 +- tests/tree/template_typedef.gw | 14 +- tests/tree/this.gw | 2 +- tests/tree/this_valid.gw | 2 +- tests/tree/typedef_auto_loop.gw | 2 +- tests/tree/typedef_func.gw | 2 +- tests/tree/typedef_func_class.gw | 4 +- tests/tree/typedef_func_tmpl.gw | 4 +- tests/tree/typedef_func_tmpl2.gw | 4 +- tests/tree/typedef_func_tmpl_class.gw | 4 +- tests/tree/unary.gw | 2 +- tests/tree/uncalled_functions.gw | 4 +- tests/tree/undefined.gw | 3 +- tests/tree/union_tmpl.gw | 2 +- tests/tree/until.gw | 6 +- tests/tree/usr_unary.gw | 8 +- tests/tree/varobject_assign.gw | 2 +- tests/tree/while.gw | 4 +- 429 files changed, 956 insertions(+), 1550 deletions(-) delete mode 100644 tests/bug/float.gw delete mode 100644 tests/bug/float2.gw diff --git a/ast b/ast index 10f8920c..a065796b 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 10f8920c058a9499259a6ab2aa6982084bcbd528 +Subproject commit a065796b43b43260ef290667711261058467158d diff --git a/examples/Gain.gw b/examples/Gain.gw index 7feb3aa9..b1b21b87 100644 --- a/examples/Gain.gw +++ b/examples/Gain.gw @@ -1,7 +1,7 @@ -adc => Gain g => dac; +adc => var Gain g => dac; g.chan(0); spork { while(true) { g.gain() == (.2 ? .2 : .1) => g.gain; .15::second => now; }}; -for(int i; i < 5; i++) { +for(var int i; i < 5; i++) { <<< g.op() >>>; i => g.op; <<< g.op() >>>; diff --git a/examples/array_lit.gw b/examples/array_lit.gw index bfd65600..6a151491 100644 --- a/examples/array_lit.gw +++ b/examples/array_lit.gw @@ -1,15 +1,15 @@ [1,2,3,4]; [ [1,2,3,4], [1,2,3,4] ]; <<< [1,2,3,4] >>>; -int i[]; -int j[3]; -Object o[2]; -Object p[2][3]; -Object r[2][3][4]; -Object s[2][3][4][5]; -Object t[2][12][3][4][5]; +var int i[]; +var int j[3]; +var Object o[2]; +var Object p[2][3]; +var Object r[2][3][4]; +var Object s[2][3][4][5]; +var Object t[2][12][3][4][5]; [1,2,3,4] @=> i; -int k[1][1]; +var int k[1][1]; <<< i, " ", j, " ", o, " ", p, " ", r, " ", s, " ", t, " ", k >>>; diff --git a/examples/array_multiple.gw b/examples/array_multiple.gw index 5e34564a..55feac7d 100644 --- a/examples/array_multiple.gw +++ b/examples/array_multiple.gw @@ -1,15 +1,15 @@ class A { - int i; + var int i; } -A a[4][4]; +var A a[4][4]; <<< a[2][3] >>>; <<< 2 => a[2][3].i >>>; -int i[4][4]; +var int i[4][4]; <<< 54 => i[2][3] >>>; -float f[4][4]; +var float f[4][4]; <<< f[2][3] >>>; <<< 12.345 => f[2][3] >>>; diff --git a/examples/auto.gw b/examples/auto.gw index bb91217b..c4056df1 100644 --- a/examples/auto.gw +++ b/examples/auto.gw @@ -1,3 +1,3 @@ -Object i[4]; +var Object i[4]; foreach(a: i) <<< a >>>; diff --git a/examples/binary_tmpl.gw b/examples/binary_tmpl.gw index 1903f662..0978dc08 100644 --- a/examples/binary_tmpl.gw +++ b/examples/binary_tmpl.gw @@ -7,4 +7,4 @@ fun void test<~A~>(A a) { <<< a >>>; } 1.3 => test; test(1); test(1.3); -C->D d => test; +var C.D d => test; diff --git a/examples/class.gw b/examples/class.gw index f22d38ae..26ce254e 100644 --- a/examples/class.gw +++ b/examples/class.gw @@ -1,8 +1,8 @@ class C { - int i; - Object o; + var int i; + var Object o; } -C c; +var C c; <<< c >>>; diff --git a/examples/class_coverage.gw b/examples/class_coverage.gw index 2d585f59..c6be9af2 100644 --- a/examples/class_coverage.gw +++ b/examples/class_coverage.gw @@ -1,10 +1,10 @@ class C { - int i; - float f; - Object o; + var int i; + var float f; + var Object o; operator @dtor void () { <<< "dtor" >>>; } } -C c; +var C c; <<< c >>>; diff --git a/examples/class_enum.gw b/examples/class_enum.gw index 5532f1b1..f620b7ee 100644 --- a/examples/class_enum.gw +++ b/examples/class_enum.gw @@ -7,5 +7,5 @@ class C { } <<< zero, " ", one, " ", two, " ", three >>>; } -C c; +var C c; <<< c >>>; diff --git a/examples/class_func_pointer.gw b/examples/class_func_pointer.gw index a255fce9..be018e22 100644 --- a/examples/class_func_pointer.gw +++ b/examples/class_func_pointer.gw @@ -2,7 +2,7 @@ fun void test() { <<< "member function." >>>; } class C { typedef void func_t(); #! typedef static void s_func_t(); - func_t func_p; + var func_t func_p; #! static fun c_t s_func_p; #! static s_func_t s_ptr; fun void test() { <<< "member function." >>>; } @@ -23,7 +23,7 @@ test(); } -C c; +var C c; c.func_p(); #!test @=> c.s_func_p; diff --git a/examples/class_spork_exp.gw b/examples/class_spork_exp.gw index 5a0d897c..f37727a5 100644 --- a/examples/class_spork_exp.gw +++ b/examples/class_spork_exp.gw @@ -1,16 +1,16 @@ class C { - 12 => int i; - Object o; + 12 => var int i; + var Object o; spork { "test"; second => now; - string s; + var string s; <<< "test spork exp." >>>; - } @=> Shred ref shred; + } @=> ref Shred shred; } -C c; +var C c; <<< c >>>; me.yield(); second => now; diff --git a/examples/class_spork_func.gw b/examples/class_spork_func.gw index 5d854c3c..bd7b29c0 100644 --- a/examples/class_spork_func.gw +++ b/examples/class_spork_func.gw @@ -8,7 +8,7 @@ class C spork this.test(); } -C c; +var C c; spork c.test(); me.yield(); 4::samp => now; diff --git a/examples/complex/event.gw b/examples/complex/event.gw index 84d2c536..f1345a84 100644 --- a/examples/complex/event.gw +++ b/examples/complex/event.gw @@ -1,4 +1,4 @@ -Event e; +var Event e; spork {second => now; e.broadcast(); }; spork \{second => now; e.broadcast(); }(); #!2::second => now; diff --git a/examples/complex/event2_1.gw b/examples/complex/event2_1.gw index 686d0905..533a4010 100644 --- a/examples/complex/event2_1.gw +++ b/examples/complex/event2_1.gw @@ -1,5 +1,5 @@ class global TestEvent { - static Event e; + static var Event e; } second => now; #!second => now; diff --git a/examples/complex/invalid_type0.gw b/examples/complex/invalid_type0.gw index 344b6dcb..45208fdf 100644 --- a/examples/complex/invalid_type0.gw +++ b/examples/complex/invalid_type0.gw @@ -1,3 +1,3 @@ class global InvalidGlobalClass { - inkrt i; + var inkrt i; } diff --git a/examples/complex/invalid_type1.gw b/examples/complex/invalid_type1.gw index 12ef4531..7ad8655f 100644 --- a/examples/complex/invalid_type1.gw +++ b/examples/complex/invalid_type1.gw @@ -1 +1 @@ -InvalidGlobalClass c; +var InvalidGlobalClass c; diff --git a/examples/const_prop.gw b/examples/const_prop.gw index 8fd4e3d2..6becaae0 100644 --- a/examples/const_prop.gw +++ b/examples/const_prop.gw @@ -1,4 +1,4 @@ -int i; +var int i; <<< 2 => i >>>; <<< i >>>; <<< i +=> i >>>; @@ -7,7 +7,7 @@ int i; <<< i +=> i >>>; <<< i >>>; -<<< 1 + 3 + i >>>; +<<< 1 + 3 + i >>>; <<< i++ >>>; <<< ++i >>>; <<< i-- >>>; diff --git a/examples/decl.gw b/examples/decl.gw index 9b4ea7b6..ed751955 100644 --- a/examples/decl.gw +++ b/examples/decl.gw @@ -1,2 +1,2 @@ -int i; +var int i; <<< i >>>; diff --git a/examples/decl_object.gw b/examples/decl_object.gw index b2fa621c..f403e4ed 100644 --- a/examples/decl_object.gw +++ b/examples/decl_object.gw @@ -1,2 +1,2 @@ -Object o; +var Object o; o; diff --git a/examples/decl_object2.gw b/examples/decl_object2.gw index 9662f99d..5068eb30 100644 --- a/examples/decl_object2.gw +++ b/examples/decl_object2.gw @@ -1 +1 @@ -SinOsc s; +var SinOsc s; diff --git a/examples/do_until.gw b/examples/do_until.gw index 235af466..8717517d 100644 --- a/examples/do_until.gw +++ b/examples/do_until.gw @@ -1,5 +1,5 @@ -int i; -float f; +var int i; +var float f; do { <<< i++ >>>; if(maybe) break; } until(i < 10); do { <<< 1 +=> f >>>; if(maybe)continue; } diff --git a/examples/dtor.gw b/examples/dtor.gw index a4779ea5..2eadac09 100644 --- a/examples/dtor.gw +++ b/examples/dtor.gw @@ -3,8 +3,8 @@ class C operator @dtor void () {<<< 1 >>>;} } -C c; -C d; +var C c; +var C d; #!me.yield(); <<< "end of dtor test." >>>; <<< c," ", d >>>; diff --git a/examples/empty_string.gw b/examples/empty_string.gw index 7f67f5c4..f89e3245 100644 --- a/examples/empty_string.gw +++ b/examples/empty_string.gw @@ -1,2 +1,2 @@ -"test" => string ref s; +"test" => ref string s; <<< s >>>; diff --git a/examples/event.gw b/examples/event.gw index 5431860e..f6903ae2 100644 --- a/examples/event.gw +++ b/examples/event.gw @@ -1,3 +1,3 @@ -Event e; +var Event e; spork { <<< second => now >>>; e.broadcast(); }; <<< e => now >>>; diff --git a/examples/event_signal.gw b/examples/event_signal.gw index 1e13861c..d6db529e 100644 --- a/examples/event_signal.gw +++ b/examples/event_signal.gw @@ -1,3 +1,3 @@ -Event e; +var Event e; spork { second => now; e.signal(); }; e => now; diff --git a/examples/extend_array_type_decl.gw b/examples/extend_array_type_decl.gw index 7ca38ae0..b361cff7 100644 --- a/examples/extend_array_type_decl.gw +++ b/examples/extend_array_type_decl.gw @@ -1,8 +1,8 @@ class C extends int[2] { <<< "test" >>>; - 123 => int i; + 123 => var int i; } -C c; +var C c; <<< c.size() >>>; <<< c.i >>>; diff --git a/examples/float.gw b/examples/float.gw index db1aab3d..c827fa33 100644 --- a/examples/float.gw +++ b/examples/float.gw @@ -1,375 +1,375 @@ #! coverage for 'float'. (generated by util/coverage.sh) -float a; +var float a; #!testing operator for float and float #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1+variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1-variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1*variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1/variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1&&variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1||variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1==variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1!=variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1>variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1>=variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1<=variable2 >>>; } #!testing operator for and float { - float variable2; + var float variable2; <<< -variable2 >>>; } #!testing operator for and int { - int variable2; + var int variable2; <<< !variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1=>variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1+=>variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1-=>variable2 >>>; } #!testing operator for float and float { - float variable1; - float variable2; + var float variable1; + var float variable2; <<< variable1*=>variable2 >>>; } #!testing operator for float and float { - 1 => float variable1; - 1 => float variable2; + 1 => var float variable1; + 1 => var float variable2; <<< variable1/=>variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1+variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1-variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1*variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1/variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1&&variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1||variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1==variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1!=variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1>variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1>=variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1<=variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1=>variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1+=>variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1-=>variable2 >>>; } #!testing operator for int and float { - int variable1; - float variable2; + var int variable1; + var float variable2; <<< variable1*=>variable2 >>>; } #!testing operator for int and float { - int variable1; - 1 => float variable2; + var int variable1; + 1 => var float variable2; <<< variable1/=>variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1+variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1-variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1*variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1/variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1&&variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1||variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1==variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1!=variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1>variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1>=variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1<=variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1=>variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1+=>variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1-=>variable2 >>>; } #!testing operator for float and int { - float variable1; - int variable2; + var float variable1; + var int variable2; <<< variable1*=>variable2 >>>; } #!testing operator for float and int { - 1 => float variable1; - 1 => int variable2; + 1 => var float variable1; + 1 => var int variable2; <<< variable1/=>variable2 >>>; } diff --git a/examples/fullrect.gw b/examples/fullrect.gw index e8f6fda8..66274ff3 100644 --- a/examples/fullrect.gw +++ b/examples/fullrect.gw @@ -1,4 +1,4 @@ -Impulse imp => FullRect fr => dac; +var Impulse imp => var FullRect fr => dac; samp => now; 1 => imp.next; samp => now; diff --git a/examples/func_pointer.gw b/examples/func_pointer.gw index 3cb5e338..7b7bf37e 100644 --- a/examples/func_pointer.gw +++ b/examples/func_pointer.gw @@ -1,5 +1,5 @@ typedef void func_t(); -func_t func_p; +var func_t func_p; fun void test1() { <<< "test1" >>>; } fun void test2() { <<< "test2" >>>; } test1 @=> func_p; diff --git a/examples/func_ptr.gw b/examples/func_ptr.gw index a809cf6a..09eced7e 100644 --- a/examples/func_ptr.gw +++ b/examples/func_ptr.gw @@ -7,7 +7,7 @@ fun void test2(){ <<< "another test" >>>; }; fun void test3(){ <<< "yet another test" >>>; }; #! create a fun pointer instance -Test test; +var Test test; #! assign it a fun test1 @=> test; diff --git a/examples/halfrect.gw b/examples/halfrect.gw index 138f10d4..b558daf2 100644 --- a/examples/halfrect.gw +++ b/examples/halfrect.gw @@ -1,4 +1,4 @@ -Impulse imp => HalfRect fr => dac; +var Impulse imp => var HalfRect fr => dac; samp => now; 1 => imp.next; samp => now; diff --git a/examples/implicit_fptr_class.gw b/examples/implicit_fptr_class.gw index 95a532e7..0fd3b631 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{} @=> t_ptr1 ptr1; + \a{} @=> var t_ptr1 ptr1; } -C c; +var C c; diff --git a/examples/implicit_ptr.gw b/examples/implicit_ptr.gw index e1ab8ab5..da6d8d7b 100644 --- a/examples/implicit_ptr.gw +++ b/examples/implicit_ptr.gw @@ -1,4 +1,4 @@ fun void test(<~int~>Ptr p) { <<< *p >>>; } -int i => test; +var int i => test; diff --git a/examples/impulse.gw b/examples/impulse.gw index 6917f5ce..ff3724f6 100644 --- a/examples/impulse.gw +++ b/examples/impulse.gw @@ -1,4 +1,4 @@ -Impulse imp => dac; +var Impulse imp => dac; 1 => imp.next; <<< imp.next() >>>; samp => now; diff --git a/examples/in_class_class.gw b/examples/in_class_class.gw index 1a1a21eb..9337a789 100644 --- a/examples/in_class_class.gw +++ b/examples/in_class_class.gw @@ -1,10 +1,10 @@ class C { - fun void test<~a~>(a var){ <<< var >>>; } - class D { int i;} + fun void test<~A~>(A a){ <<< a >>>; } + class D { var int i;} } -C c; -C->D d; -C->D ref d_ref; +var C c; +var C.D d; +ref C.D d_ref; <<< c, " ", d, d_ref >>>; diff --git a/examples/int.gw b/examples/int.gw index 39f164c6..0d16ded1 100644 --- a/examples/int.gw +++ b/examples/int.gw @@ -1,249 +1,243 @@ #! coverage for 'int'. (generated by util/coverage.sh) -int a; +var int a; #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1+variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1-variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1*variable2 >>>; } #!testing operator for int and int { - int variable1; - 1 => int variable2; + var int variable1; + 1 => var int variable2; <<< variable1/variable2 >>>; } #!testing operator for int and int { - int variable1; - 1 => int variable2; + var int variable1; + 1 => var int variable2; <<< variable1%variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1&&variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1||variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1==variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1!=variable2 >>>; } -#!testing operator for Object and -{ - Object ref variable1; -<<< variable1!= null >>>; -} #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1>=variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1<=variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1>>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1<>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1&variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1|variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1^variable2 >>>; } #!testing operator for and int { - int variable2; + var int variable2; <<< -variable2 >>>; } #!testing operator for and int { - int variable2; + var int variable2; <<< !variable2 >>>; } #!testing operator for int and { - int variable1; + var int variable1; <<< variable1++ >>>; } #!testing operator for and int { - int variable2; + var int variable2; <<< ++variable2 >>>; } #!testing operator for int and { - int variable1; + var int variable1; <<< variable1-- >>>; } #!testing operator for and int { - int variable2; + var int variable2; <<< --variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1+=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1-=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1*=>variable2 >>>; } #!testing operator for int and int { - 1 => int variable1; - 1 => int variable2; + 1 => var int variable1; + 1 => var int variable2; <<< variable1/=>variable2 >>>; } #!testing operator for int and int { - 1 => int variable1; - int variable2; + 1 => var int variable1; + var int variable2; <<< variable1%=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1<<=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1>>=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1&=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1|=>variable2 >>>; } #!testing operator for int and int { - int variable1; - int variable2; + var int variable1; + var int variable2; <<< variable1^=>variable2 >>>; } #! testing cmp -~1; diff --git a/examples/member.gw b/examples/member.gw index 20419340..1820dead 100644 --- a/examples/member.gw +++ b/examples/member.gw @@ -1,15 +1,15 @@ class C { - int i; - float f; - Object o; + var int i; + var float f; + var Object o; fun int m_i() { return i; } fun float m_f() { return f; } fun Object m_o() { return o; } } -C c; +var C c; #! read members <<< c.i, c.f, c.o >>>; diff --git a/examples/member_func.gw b/examples/member_func.gw index 06ab956c..ae9f7315 100644 --- a/examples/member_func.gw +++ b/examples/member_func.gw @@ -9,7 +9,7 @@ class C } } -C c; +var C c; <<< c.testf() >>>; <<< c.testf(1.4) >>>; <<< 1.2 >>>; diff --git a/examples/module_coverage.gw b/examples/module_coverage.gw index 82a17512..bd93e1ae 100644 --- a/examples/module_coverage.gw +++ b/examples/module_coverage.gw @@ -1,9 +1,9 @@ -SinOsc s => Gain g => HalfRect h => blackhole; -s => ZeroX z => blackhole; +var SinOsc s => var Gain g => var HalfRect h => blackhole; +s => var ZeroX z => blackhole; 17 => s.init; (1024, .17) => s.init; -Impulse i => FullRect f => blackhole; -Step step => blackhole; +var Impulse i => var FullRect f => blackhole; +var Step step => blackhole; second => now; <<< "end" >>>; step =< blackhole; diff --git a/examples/object_string.gw b/examples/object_string.gw index e9d639b9..8322cc44 100644 --- a/examples/object_string.gw +++ b/examples/object_string.gw @@ -1,3 +1,3 @@ -Object o; -string s; +var Object o; +var string s; <<< o + s >>>; diff --git a/examples/op.gw b/examples/op.gw index 51832807..07157aba 100644 --- a/examples/op.gw +++ b/examples/op.gw @@ -5,7 +5,7 @@ operator => void (Object o, int i) { } class C { - Object ref ref_object; + ref Object ref_object; } #!! assign object to C.ref @@ -15,10 +15,10 @@ operator => void (Object o, C c) { } #!operator int plusplus(null d, int i){} -int i; -Object o; +var int i; +var Object o; <<< o, " ", i >>>; 12 => i; #!o => i; -C c; +var C c; o => c; diff --git a/examples/op2.gw b/examples/op2.gw index 9056c3f1..04ff416f 100644 --- a/examples/op2.gw +++ b/examples/op2.gw @@ -1,6 +1,6 @@ class C { - float f; + var float f; } operator => float (C c, C d){ <<< "float => C: ", c.f => d.f >>>; return 2.0;} @@ -10,19 +10,17 @@ operator => float (float f, C d){ <<< "float => C: ", f => d.f >>>; re operator => float (C d, int c){ <<< "int => C: ", c => d.f >>>; return 2.0;} operator => float (C d, float f){ <<< "C => float: ", f => d.f >>>; return 2.0;} -C c, d; +var C c, d; 12.3 => c.f; <<< c => d >>>; <<< 2 => d >>>; <<< 2.3 => d >>>; -int i; -2 => float f; -complex cmp; +var int i; +2 => var float f; <<< f >>>; c => i; <<< c.f >>>; <<< f >>>; c => f; -c => cmp; diff --git a/examples/postfix.gw b/examples/postfix.gw index c6566f03..1395afe3 100644 --- a/examples/postfix.gw +++ b/examples/postfix.gw @@ -1,2 +1,2 @@ -int i; +var int i; i++; diff --git a/examples/ptr_assign.gw b/examples/ptr_assign.gw index c111c467..c7fbc0e3 100644 --- a/examples/ptr_assign.gw +++ b/examples/ptr_assign.gw @@ -2,5 +2,5 @@ class C { } class D extends C { } -D d; -d :=> <~C~>Ptr pd; +var D d; +d :=> var <~C~>Ptr pd; diff --git a/examples/ptr_assign_class.gw b/examples/ptr_assign_class.gw index 913cc60a..c0cc0e42 100644 --- a/examples/ptr_assign_class.gw +++ b/examples/ptr_assign_class.gw @@ -1,9 +1,9 @@ class C { typedef void Test(); fun void test1(){}; - Test test0; + var Test test0; <<< test1 @=> test0 >>>; } -C c; +var C c; <<< c >>>; diff --git a/examples/ptr_cast.gw b/examples/ptr_cast.gw index 27c17a32..1d2e3ee9 100644 --- a/examples/ptr_cast.gw +++ b/examples/ptr_cast.gw @@ -1,2 +1,2 @@ -12 => int i; +12 => var int i; <<Ptr >>>; diff --git a/examples/ptr_deref.gw b/examples/ptr_deref.gw index 4a5fd7a5..e15694de 100644 --- a/examples/ptr_deref.gw +++ b/examples/ptr_deref.gw @@ -1,3 +1,3 @@ -int i; -i :=> <~int~>Ptr pti; +var int i; +i :=> var <~int~>Ptr pti; <<<12 => *pti, " ", *pti>>>; diff --git a/examples/shred.gw b/examples/shred.gw index cb479da3..57834c06 100644 --- a/examples/shred.gw +++ b/examples/shred.gw @@ -5,7 +5,7 @@ <<< "from_Id ", Shred.fromId(1) >>>; <<< "me ", me >>>; <<< "args ", me.args() >>>; -for (int i; i < me.args(); i++) +for (var int i; i < me.args(); i++) <<< "arg ", i, me.arg(i) >>>; <<< me.dir(), " ", me.path() >>>; <<< me.code_dir(), " ", me.code_path() >>>; diff --git a/examples/sine.gw b/examples/sine.gw index 8596d786..c5f06ee0 100644 --- a/examples/sine.gw +++ b/examples/sine.gw @@ -1,4 +1,4 @@ -SinOsc sinosc => dac; +var SinOsc sinosc => dac; 1::second => now; sinosc.freq(220); 1::second => now; diff --git a/examples/sine2.gw b/examples/sine2.gw index afb226dc..711dbb20 100644 --- a/examples/sine2.gw +++ b/examples/sine2.gw @@ -1,3 +1,3 @@ -SinOsc sinosc => dac; +var SinOsc sinosc => dac; <<< second >>>; 5::second => now; diff --git a/examples/sinosc_extend.gw b/examples/sinosc_extend.gw index 8c7f7aeb..33d69057 100644 --- a/examples/sinosc_extend.gw +++ b/examples/sinosc_extend.gw @@ -3,6 +3,6 @@ class Sine extends SinOsc fun float freq(float f) { (2 * f) => (this $ SinOsc).freq; } } -Sine s => dac; +var Sine s => dac; 220 => s.freq; second => now; diff --git a/examples/spork_exp.gw b/examples/spork_exp.gw index 7f4e907e..5da1b739 100644 --- a/examples/spork_exp.gw +++ b/examples/spork_exp.gw @@ -1,18 +1,18 @@ class C { - 12 => int i; - Object o; + 12 => var int i; + var Object o; <<< this >>>; spork { "test"; second => now; - string s; + var string s; <<< this, " test spork exp. " , s >>>; - } @=> Shred ref shred; + } @=> ref Shred shred; } -C c; +var C c; <<< c >>>; me.yield(); second => now; diff --git a/examples/spork_func.gw b/examples/spork_func.gw index 27c279b7..46fd34da 100644 --- a/examples/spork_func.gw +++ b/examples/spork_func.gw @@ -7,7 +7,7 @@ class C } } -C c; +var C c; spork c.test(2); me.yield(); 4::samp => now; diff --git a/examples/static.gw b/examples/static.gw index 90fe87f3..527645f9 100644 --- a/examples/static.gw +++ b/examples/static.gw @@ -1,8 +1,8 @@ class C { - static int i; - static float f; - static Object o; + static var int i; + static var float f; + static var Object o; fun int m_i() { return i; } fun float m_f() { return f; } diff --git a/examples/step.gw b/examples/step.gw index fa1ab6b7..3d6fc573 100644 --- a/examples/step.gw +++ b/examples/step.gw @@ -1,4 +1,4 @@ -Step step => dac; +var Step step => dac; .1 => step.next; samp => now; <<>>; diff --git a/examples/string.gw b/examples/string.gw index 79c9f6d1..f6978082 100644 --- a/examples/string.gw +++ b/examples/string.gw @@ -1,4 +1,4 @@ -string s; +var string s; "CamelCase" => s; <<< "test" => s >>>; <<< null @=> s >>>; #!test me diff --git a/examples/template.gw b/examples/template.gw index 27a3e293..64d76018 100644 --- a/examples/template.gw +++ b/examples/template.gw @@ -1,4 +1,4 @@ -fun void test<~A~> (A var){ <<< var >>>; } -fun void test<~A,B~> (A var, B var2){ <<< var >>>; } +fun void test<~A~> (A a){ <<< a >>>; } +fun void test<~A,B~> (A a, B b){ <<< a >>>; } test<~int~>(1); test<~float, float~>(3, 1.4); diff --git a/examples/template_dyn.gw b/examples/template_dyn.gw index 60efe516..85b2d1d8 100644 --- a/examples/template_dyn.gw +++ b/examples/template_dyn.gw @@ -16,9 +16,9 @@ class E extends D { } -<<< C c >>>; -<<< D d >>>; -<<< E e >>>; +<<< var C c >>>; +<<< var D d >>>; +<<< var E e >>>; test(c); test(d); diff --git a/examples/trig.gw b/examples/trig.gw index 772e7085..c8d83f55 100644 --- a/examples/trig.gw +++ b/examples/trig.gw @@ -1,3 +1,3 @@ -SinOsc s :=> Dtrig dtrig => blackhole; +var SinOsc s :=> var Dtrig dtrig => blackhole; second => now; s :=< dtrig; diff --git a/examples/typedef_array_extend.gw b/examples/typedef_array_extend.gw index 7a0ee9af..dd29eb05 100644 --- a/examples/typedef_array_extend.gw +++ b/examples/typedef_array_extend.gw @@ -1,5 +1,5 @@ #!int i[]; typedef int[2] lol; class C extends lol { } -C c; +var C c; <<< c.size() >>>; diff --git a/examples/typeof_array.gw b/examples/typeof_array.gw index 1a1222d4..06f48b69 100644 --- a/examples/typeof_array.gw +++ b/examples/typeof_array.gw @@ -1,3 +1,3 @@ -int i[2]; +var int i[2]; <<< typeof(i) >>>; <<< typeof(1) >>>; diff --git a/examples/typeof_decl.gw b/examples/typeof_decl.gw index 7d5d8bf5..9be4f594 100644 --- a/examples/typeof_decl.gw +++ b/examples/typeof_decl.gw @@ -1,2 +1,2 @@ -int i; -<<>>; +var int i; +<<< var typeof(i) j>>>; diff --git a/examples/ugen_connect_no_in.gw b/examples/ugen_connect_no_in.gw index 415752e8..fecd3104 100644 --- a/examples/ugen_connect_no_in.gw +++ b/examples/ugen_connect_no_in.gw @@ -1 +1 @@ -Gain a => SinOsc s => blackhole; +var Gain a => var SinOsc s => blackhole; diff --git a/examples/ugen_disconnect_no_in.gw b/examples/ugen_disconnect_no_in.gw index 942bb9b4..2c2a33f8 100644 --- a/examples/ugen_disconnect_no_in.gw +++ b/examples/ugen_disconnect_no_in.gw @@ -1,3 +1,3 @@ -Gain a; -SinOsc s => blackhole; +var Gain a; +var SinOsc s => blackhole; a =< s; diff --git a/examples/usr_postfix.gw b/examples/usr_postfix.gw index 815584f9..c864f106 100644 --- a/examples/usr_postfix.gw +++ b/examples/usr_postfix.gw @@ -1,9 +1,12 @@ -class C { int i; } +class C { + var int i; +} + operator ++ int (C c) { <<< "here" >>>; <<< c.i++ >>>; } -C c; +var C c; c++; c++; <<< c.i >>>; diff --git a/examples/vararg.gw b/examples/vararg.gw index 7daaa2b2..52c70146 100644 --- a/examples/vararg.gw +++ b/examples/vararg.gw @@ -1,5 +1,5 @@ fun void test(...) { - int i; + var int i; varloop vararg { if(i == 0) <<< vararg $ int >>>; diff --git a/examples/zerox.gw b/examples/zerox.gw index 25597faa..369fc12b 100644 --- a/examples/zerox.gw +++ b/examples/zerox.gw @@ -1,4 +1,4 @@ -Impulse imp => ZeroX fr => dac; +var Impulse imp => var ZeroX fr => dac; samp => now; -1 => imp.next; samp => now; diff --git a/plug b/plug index 1c83920b..25b4ae8c 160000 --- a/plug +++ b/plug @@ -1 +1 @@ -Subproject commit 1c83920b6f482bfd70f6f6f71e074208c33581d4 +Subproject commit 25b4ae8cf9910effbf486fb11e0d8b0ea53ddd21 diff --git a/tests/UsrUgen/UsrUGen.gw b/tests/UsrUgen/UsrUGen.gw index ab729f48..9c9b4bf5 100644 --- a/tests/UsrUgen/UsrUGen.gw +++ b/tests/UsrUgen/UsrUGen.gw @@ -10,7 +10,7 @@ class C extends UsrUGen { <<>>; } -C u => dac; +var C u => dac; <<< u >>>; #! use default tick diff --git a/tests/UsrUgen/UsrUGen_more_arg.gw b/tests/UsrUgen/UsrUGen_more_arg.gw index 08052050..03a14b53 100644 --- a/tests/UsrUgen/UsrUGen_more_arg.gw +++ b/tests/UsrUgen/UsrUGen_more_arg.gw @@ -11,7 +11,7 @@ class C extends UsrUGen { <<>>; } -C u => dac; +var C u => dac; <<< u >>>; samp => now; <<< u.last() >>>; diff --git a/tests/UsrUgen/UsrUGen_no_arg.gw b/tests/UsrUgen/UsrUGen_no_arg.gw index 564eceb2..0804718d 100644 --- a/tests/UsrUgen/UsrUGen_no_arg.gw +++ b/tests/UsrUgen/UsrUGen_no_arg.gw @@ -11,7 +11,7 @@ class C extends UsrUGen { <<>>; } -C u => dac; +var C u => dac; <<< u >>>; samp => now; <<< u.last() >>>; diff --git a/tests/UsrUgen/UsrUGen_no_float.gw b/tests/UsrUgen/UsrUGen_no_float.gw index 8717a16e..2614e276 100644 --- a/tests/UsrUgen/UsrUGen_no_float.gw +++ b/tests/UsrUgen/UsrUGen_no_float.gw @@ -10,7 +10,7 @@ class C extends UsrUGen { <<>>; } -C u => dac; +var C u => dac; <<< u >>>; samp => now; <<< u.last() >>>; diff --git a/tests/UsrUgen/UsrUGen_ret_no_float.gw b/tests/UsrUgen/UsrUGen_ret_no_float.gw index 5afd812f..f3628368 100644 --- a/tests/UsrUgen/UsrUGen_ret_no_float.gw +++ b/tests/UsrUgen/UsrUGen_ret_no_float.gw @@ -10,7 +10,7 @@ class C extends UsrUGen { <<>>; } -C u => dac; +var C u => dac; <<< u >>>; samp => now; <<< u.last() >>>; diff --git a/tests/UsrUgen/null_tick.gw b/tests/UsrUgen/null_tick.gw index 6b2d7693..35bde49b 100644 --- a/tests/UsrUgen/null_tick.gw +++ b/tests/UsrUgen/null_tick.gw @@ -1,3 +1,3 @@ #! [contains] NullTickException typedef float ptr_t(float); -ptr_t ptr ~= UsrUGen u; +var ptr_t ptr ~= var UsrUGen u; diff --git a/tests/bug/Tester.gw b/tests/bug/Tester.gw index 1bb75922..7cacda5e 100644 --- a/tests/bug/Tester.gw +++ b/tests/bug/Tester.gw @@ -1,13 +1,13 @@ class Tester { - fun int assert<~A~>_equal(string description, A a, A b){ if(a == b) return 0; return 1; } - fun int assert<~A~>_not_equal(string description, A a, A b){ if(a != b) return 0; return 1; } + fun int assert_equal<~A~>(string description, A a, A b){ if(a == b) return 0; return 1; } + fun int assert_not_equal<~A~>(string description, A a, A b){ if(a != b) return 0; return 1; } } -Tester t; -Object o; -Object ref ref; -"test" => string s; +var Tester t; +var Object o; +ref Object oref; +"test" => var string s; #!<<< t.assert_equal("test", 1, 1) >>>; #!<<< t.assert_equal("test", 2, 1) >>>; <<< t.assert_equal(s, 1, 1) >>>; @@ -16,11 +16,11 @@ Object ref ref; <<< t.assert_equal(s, o, o) >>>; <<< t.assert_equal(s, o, null) >>>; <<< t.assert_equal(s, null $ Object, null) >>>; -<<< t.assert_equal(s, ref, null) >>>; +<<< t.assert_equal(s, oref, null) >>>; <<< t.assert_not_equal(s, 1, 1) >>>; <<< t.assert_not_equal(s, 2, 1 + 1) >>>; <<< t.assert_not_equal(s, 2, 1) >>>; <<< t.assert_not_equal(s, o, o) >>>; <<< t.assert_not_equal(s, o, null) >>>; <<< t.assert_not_equal(s, null $ Object, null) >>>; -<<< t.assert_not_equal(s, ref, null) >>>; +<<< t.assert_not_equal(s, oref, null) >>>; diff --git a/tests/bug/array.gw b/tests/bug/array.gw index ca58279e..3b8d4615 100644 --- a/tests/bug/array.gw +++ b/tests/bug/array.gw @@ -1,7 +1,7 @@ class Test_Array { - int i[4]; - float f[4]; + var int i[4]; + var float f[4]; i[0]; f[0]; @@ -14,5 +14,5 @@ class Test_Array <<< i.size() >>>; } -Test_Array t; +var Test_Array t; <<< t >>>; diff --git a/tests/bug/class_doc.gw b/tests/bug/class_doc.gw index f4598a8c..da3b55ff 100644 --- a/tests/bug/class_doc.gw +++ b/tests/bug/class_doc.gw @@ -2,7 +2,7 @@ class C { #!! has an int - int i; + var int i; #!! a fun fun void test() {} #!! operator diff --git a/tests/bug/do_until.gw b/tests/bug/do_until.gw index 814004c4..3daed348 100644 --- a/tests/bug/do_until.gw +++ b/tests/bug/do_until.gw @@ -1,10 +1,10 @@ -int i; +var int i; do { <<< i++ >>>; } while(i < 6); do { <<< i-- >>>; } while(i); -6 => 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 83573d25..16f87468 100644 --- a/tests/bug/do_while.gw +++ b/tests/bug/do_while.gw @@ -1,6 +1,6 @@ -5 => int i; +5 => var int i; do { <<< i-- >>>; } while(i); -5 => float f; +5 => var float f; do { <<< 1 -=> f >>>; } while(f > 0.0); #! do { <<< 1 -=> f >>>; } while(f > 0); 5 => f; diff --git a/tests/bug/dot_member_func.gw b/tests/bug/dot_member_func.gw index 4b63417e..c18ce7ea 100644 --- a/tests/bug/dot_member_func.gw +++ b/tests/bug/dot_member_func.gw @@ -1,12 +1,12 @@ #! thanks to afl-fuzz -SinOsc ref s, t; -Gain g => dac; +ref SinOsc s, t; +var Gain g => dac; 1 => t.freq; s => g; t => g; g.chan(0); spork { while(true) { Math.rand2f(100, 800) => s.freq; .15::second => now; }}; -for(int i; i < 5; i++) { +for(var int i; i < 5; i++) { <<< g.op() >>>; i => g.op; 2::second => now; diff --git a/tests/bug/float.gw b/tests/bug/float.gw deleted file mode 100644 index 7dddd43d..00000000 --- a/tests/bug/float.gw +++ /dev/null @@ -1,489 +0,0 @@ -#! coverage for 'float'. (generated by util/coverage.sh) - -float a; - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1=variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1+variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1-variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1*variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - 1 => float variable2; -<<< variable1/variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1&&variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1||variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1==variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1!=variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1>variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1>=variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1<=variable2 >>>; -} - -#!testing operator for and float -{ - float variable2; -<<< -variable2 >>>; -} - -#!testing operator for and int -{ - int variable2; -<<< !variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1=>variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1+=>variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1-=>variable2 >>>; -} - -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1*=>variable2 >>>; -} -#!testing operator for float and float -{ - float variable1; - float variable2; -<<< variable1/=>variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1=variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1+variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1-variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1*variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1/variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1&&variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1||variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1==variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1!=variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1>variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1>=variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1<=variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1=>variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1+=>variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1-=>variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1*=>variable2 >>>; -} - -#!testing operator for int and float -{ - int variable1; - float variable2; -<<< variable1/=>variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1+variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1-variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1*variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1/variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1&&variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1||variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1==variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1!=variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1>variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1>=variable2 >>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1>>; -} - -#!testing operator for float and int -{ - float variable1; - int variable2; -<<< variable1<=variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1=>variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1+variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1-variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1*variable2 >>>; -} - -#!testing operator for dur and float -{ - dur variable1; - float variable2; -<<< variable1*variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1/variable2 >>>; -} - -#!testing operator for dur and float -{ - dur variable1; - float variable2; -<<< variable1/variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1>variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1>=variable2 >>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1>>; -} - -#!testing operator for dur and dur -{ - dur variable1; - dur variable2; -<<< variable1<=variable2 >>>; -} - -#!testing operator for time and time -{ - time variable1; - time variable2; -<<< variable1=>variable2 >>>; -} - -#!testing operator for dur and time -{ - dur variable1; - time variable2; -<<< variable1=>variable2 >>>; -} - -#!testing operator for dur and -{ - dur variable1; -<<< variable1=> now >>>; -} - -#!testing operator for time and dur -{ - time variable1; - dur variable2; -<<< variable1+variable2 >>>; -} - -#!testing operator for dur and time -{ - dur variable1; - time variable2; -<<< variable1+variable2 >>>; -} - -#!testing operator for time and time -{ - time variable1; - time variable2; -<<< variable1>variable2 >>>; -} - -#!testing operator for time and time -{ - time variable1; - time variable2; -<<< variable1>=variable2 >>>; -} - -#!testing operator for time and time -{ - time variable1; - time variable2; -<<< variable1>>; -} - -#!testing operator for time and time -{ - time variable1; - time variable2; -<<< variable1<=variable2 >>>; -} diff --git a/tests/bug/float2.gw b/tests/bug/float2.gw deleted file mode 100644 index 59f8352c..00000000 --- a/tests/bug/float2.gw +++ /dev/null @@ -1,82 +0,0 @@ -int i; -float f,g; - -<<< f + 1.0 >>>; -<<< f - 1.0 >>>; -<<< f * 1.0 >>>; -<<< f / 1.0 >>>; - -<<< f && 1.0 >>>; -<<< f || 1.0 >>>; - -<<< f == 1.0 >>>; -<<< f != 1.0 >>>; - -<<< 1 > 1.0 >>>; -<<< 1 >= 1.0 >>>; -<<< 1 < 1.0 >>>; -<<< 1 <= 1.0 >>>; - - -<<< -f >>>; -<<< !f >>>; -<<< 1.0 => f >>>; -<<< 1.0 +=> f >>>; -<<< 1.0 -=> f >>>; -<<< 1.0 /=> f >>>; -<<< 1.0 *=> f >>>; - -<<< "if" >>>; - -<<< i + 1.0 >>>; -<<< i - 1.0 >>>; -<<< i * 1.0 >>>; -<<< i / 1.0 >>>; - -<<< i && 1.0 >>>; -<<< i || 1.0 >>>; - -<<< i == 1.0 >>>; -<<< i != 1.0 >>>; - -<<< i > 1.0 >>>; -<<< i >= 1.0 >>>; -<<< i < 1.0 >>>; -<<< i <= 1.0 >>>; - -<<< -i >>>; -<<< !i >>>; - -<<< "fi" >>>; -<<< 1.0 => i >>>; -<<< 1.0 +=> i >>>; -<<< 1.0 -=> i >>>; -<<< 1.0 /=> i >>>; -<<< 1.0 *=> i >>>; -<<< 1.0 + i >>>; -<<< 1.0 - i >>>; -<<< 1.0 * i >>>; -<<< 1.0 / i >>>; - -<<< i, 1.0 && i >>>; -<<< i, 1.0 && !i >>>; -<<< 1.0 || i >>>; -<<< 0.0 || i >>>; - - -#!<<< 1.0 == i >>>; -#!<<< 1.0 != i >>>; - - -<<< 1.0 +=> i >>>; -<<< 1.0 => i >>>; - -<<< 1.0 -=> i >>>; -<<< 1.0 /=> i >>>; -<<< 1.0 *=> i >>>; - -<<< 1.0 > i >>>; -<<< 1.0 >= i >>>; -<<< 1.0 < i >>>; -<<< 1.0 <= i >>>; -<<< g >>>; diff --git a/tests/bug/object_string.gw b/tests/bug/object_string.gw index ff20759c..ba13571e 100644 --- a/tests/bug/object_string.gw +++ b/tests/bug/object_string.gw @@ -1,3 +1,3 @@ -Object o; -"Object: " => string s; +var Object o; +"Object: " => var string s; <<< s + (o + "") >>>; diff --git a/tests/bug/play_with_str.gw b/tests/bug/play_with_str.gw index b0a4ad78..4e5619e8 100644 --- a/tests/bug/play_with_str.gw +++ b/tests/bug/play_with_str.gw @@ -1,4 +1,4 @@ -"lol" @=> string ref s; +"lol" @=> ref string s; "test" => s; <<< "testmem".replace(2, 3, "UKUH") >>>; diff --git a/tests/bug/static_data.gw b/tests/bug/static_data.gw index f3c96bc3..de5cabd2 100644 --- a/tests/bug/static_data.gw +++ b/tests/bug/static_data.gw @@ -1,8 +1,8 @@ class C { - static int i; - static float f; - static Object o; + static var int i; + static var float f; + static var Object o; } <<< C.i >>>; <<< C.f >>>; diff --git a/tests/bug/ugen.gw b/tests/bug/ugen.gw index 275c0073..b41e5937 100644 --- a/tests/bug/ugen.gw +++ b/tests/bug/ugen.gw @@ -1,7 +1,7 @@ -UGen ref u; +ref UGen u; #!u.last(); #! should fail => fails. -SinOsc s => Gain g => dac; -for(-1 => int i;i < 6; i++) +ref SinOsc s => ref Gain g => dac; +for(-1 => var int i;i < 6; i++) i => g.op; samp => now; s.last(); diff --git a/tests/error/0_size_variable.gw b/tests/error/0_size_variable.gw index 11ca4d63..75f66b6e 100644 --- a/tests/error/0_size_variable.gw +++ b/tests/error/0_size_variable.gw @@ -1,2 +1,2 @@ #! [contains] cannot -void this_won_t_work; +var void this_won_t_work; diff --git a/tests/error/UgenConnectException.gw b/tests/error/UgenConnectException.gw index 81faa9a9..0f4cef66 100644 --- a/tests/error/UgenConnectException.gw +++ b/tests/error/UgenConnectException.gw @@ -1 +1 @@ -Gain ref g => dac; +ref Gain g => dac; diff --git a/tests/error/abstract.gw b/tests/error/abstract.gw index 19930d17..0252d6eb 100644 --- a/tests/error/abstract.gw +++ b/tests/error/abstract.gw @@ -1,2 +1,2 @@ #! [contains] is abstract, declare as ref -Shred shred; +var Shred shred; diff --git a/tests/error/already_parent.gw b/tests/error/already_parent.gw index 63959026..6bf183b6 100644 --- a/tests/error/already_parent.gw +++ b/tests/error/already_parent.gw @@ -1,8 +1,8 @@ #! [contains] has already been defined in parent class class C { - int i; + var int i; } class CC extends C { - int i; + var int i; } diff --git a/tests/error/array_assign_exp.gw b/tests/error/array_assign_exp.gw index 5b44a0f2..492df23c 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] @=> int loop[1]; +[1,2,3,4] @=> var int loop[1]; diff --git a/tests/error/array_depth_match.gw b/tests/error/array_depth_match.gw index e411cf94..9b85fb01 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] @=> int k[1][1]; +[1,2,3,4] @=> var int k[1][1]; diff --git a/tests/error/array_err2.gw b/tests/error/array_err2.gw index 5afa3717..c73e00da 100644 --- a/tests/error/array_err2.gw +++ b/tests/error/array_err2.gw @@ -1,2 +1,2 @@ #! [contains] partially empty array init -int i[2][]; +var int i[2][]; diff --git a/tests/error/array_err3.gw b/tests/error/array_err3.gw index 7f1ed39d..421f0c16 100644 --- a/tests/error/array_err3.gw +++ b/tests/error/array_err3.gw @@ -1,2 +1,2 @@ #! [contains] partially empty array init -int i[][3]; +var int i[][3]; diff --git a/tests/error/array_excess.gw b/tests/error/array_excess.gw index ebb16797..2c0a00f4 100644 --- a/tests/error/array_excess.gw +++ b/tests/error/array_excess.gw @@ -1,3 +1,3 @@ #! [contains] exceeds defined dimension - int i[2]; +var int i[2]; i[0][0]; diff --git a/tests/error/array_failure.gw b/tests/error/array_failure.gw index a23c78b7..39cb6a60 100644 --- a/tests/error/array_failure.gw +++ b/tests/error/array_failure.gw @@ -1,2 +1,2 @@ #! [contains] NegativeArraySize -int i[2][-1]; +var int i[2][-1]; diff --git a/tests/error/array_multi_except.gw b/tests/error/array_multi_except.gw index 614905e1..3ad377c7 100644 --- a/tests/error/array_multi_except.gw +++ b/tests/error/array_multi_except.gw @@ -1,4 +1,4 @@ #! [contains] NullPtrException -int i[1][1]; +var int i[1][1]; null @=> i[0]; <<< i[0][0] >>>; diff --git a/tests/error/array_multi_oob.gw b/tests/error/array_multi_oob.gw index 0ab571b2..2b2bf845 100644 --- a/tests/error/array_multi_oob.gw +++ b/tests/error/array_multi_oob.gw @@ -1,3 +1,3 @@ #! [contains] ArrayOutofBounds -Object o[1][1]; +var Object o[1][1]; o[1]; diff --git a/tests/error/array_no_member.gw b/tests/error/array_no_member.gw index de08f1fd..da362bc7 100644 --- a/tests/error/array_no_member.gw +++ b/tests/error/array_no_member.gw @@ -1,3 +1,3 @@ #! [contains] has no member -int i[2][2]; +var int i[2][2]; i[0].test; diff --git a/tests/error/array_oob.gw b/tests/error/array_oob.gw index cb186b85..78df717a 100644 --- a/tests/error/array_oob.gw +++ b/tests/error/array_oob.gw @@ -1,3 +1,3 @@ #! [contains] ArrayOutofBounds -Object i[1]; +var Object i[1]; i[1]; diff --git a/tests/error/array_oob_multi.gw b/tests/error/array_oob_multi.gw index 2dcdb4ed..0de037f9 100644 --- a/tests/error/array_oob_multi.gw +++ b/tests/error/array_oob_multi.gw @@ -1,3 +1,3 @@ #! [contains] ArrayOutofBounds -Object i[1][1]; +var Object i[1][1]; i[1][0]; diff --git a/tests/error/array_ref_exp.gw b/tests/error/array_ref_exp.gw index 484dbb1e..ec861949 100644 --- a/tests/error/array_ref_exp.gw +++ b/tests/error/array_ref_exp.gw @@ -1,2 +1,2 @@ #! [contains] ref array must not have array expression -int ref my_array[2]; +ref int my_array[2]; diff --git a/tests/error/array_type_match.gw b/tests/error/array_type_match.gw index 63709514..3b085a95 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] @=> Object k[1]; +[1,2,3,4] @=> var Object k[1]; diff --git a/tests/error/auto_fail.gw b/tests/error/auto_fail.gw index 34b657f0..1598b5ea 100644 --- a/tests/error/auto_fail.gw +++ b/tests/error/auto_fail.gw @@ -1,2 +1,2 @@ #! [contains] no match found for operator -int => auto ae @=> auto A; +var int i => var auto ae @=> var auto A; diff --git a/tests/error/auto_not_array.gw b/tests/error/auto_not_array.gw index 6a364207..c3943d69 100644 --- a/tests/error/auto_not_array.gw +++ b/tests/error/auto_not_array.gw @@ -1,4 +1,4 @@ #! [contains] not allowed in auto loop -Object i; +var Object i; foreach(a: i) <<< a >>>; diff --git a/tests/error/cant_find_in_nspc.gw b/tests/error/cant_find_in_nspc.gw index 31e9c033..37e3eddf 100644 --- a/tests/error/cant_find_in_nspc.gw +++ b/tests/error/cant_find_in_nspc.gw @@ -1,16 +1,16 @@ #! [contains] cannot find class class C { class D { - int i; + var int i; } } class E extends C { - C->D d; + var C.D d; } class F { - F->D d; + var F.D d; } -F f; +var F f; diff --git a/tests/error/cant_infer.gw b/tests/error/cant_infer.gw index e886f9dd..51ed03f4 100644 --- a/tests/error/cant_infer.gw +++ b/tests/error/cant_infer.gw @@ -1,2 +1,2 @@ #! [contains] can't infer -auto i; +var auto i; diff --git a/tests/error/class_inside.gw b/tests/error/class_inside.gw index 46ffadd3..186355b2 100644 --- a/tests/error/class_inside.gw +++ b/tests/error/class_inside.gw @@ -1,4 +1,4 @@ #! [contains] declared inside class c { - c var; + var c myvar; } diff --git a/tests/error/conflict_super.gw b/tests/error/conflict_super.gw index 72199c4b..2b4be6cd 100644 --- a/tests/error/conflict_super.gw +++ b/tests/error/conflict_super.gw @@ -1,5 +1,6 @@ #! [contains] function name 'test' conflicts with previously defined value -class C { int test; +class C { + var int test; } class D extends C { diff --git a/tests/error/connect_except.gw b/tests/error/connect_except.gw index 893c5b6e..084f50b4 100644 --- a/tests/error/connect_except.gw +++ b/tests/error/connect_except.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -UGen ref u; +ref UGen u; adc => u; diff --git a/tests/error/defined_class.gw b/tests/error/defined_class.gw index 10a26a2f..30f79818 100644 --- a/tests/error/defined_class.gw +++ b/tests/error/defined_class.gw @@ -1,3 +1,3 @@ #! [contains] already defined - class C{} +class C{} class C{} diff --git a/tests/error/empty_for.gw b/tests/error/empty_for.gw index 557ca865..9c5c3db8 100644 --- a/tests/error/empty_for.gw +++ b/tests/error/empty_for.gw @@ -1,3 +1,3 @@ #! [contains] empty for loop condition <<< "test" >>>; -for(int i;;){} +for(var int i;;){} diff --git a/tests/error/empty_member_ptr.gw b/tests/error/empty_member_ptr.gw index e5a900a2..8d7aae20 100644 --- a/tests/error/empty_member_ptr.gw +++ b/tests/error/empty_member_ptr.gw @@ -2,8 +2,8 @@ class C { typedef void test(); - test t; + var test t; } -<<< C c >>>; +<<< var C c >>>; <<< c.t >>>; c.t(); diff --git a/tests/error/empty_obj_data.gw b/tests/error/empty_obj_data.gw index 10c4c321..c4d18b63 100644 --- a/tests/error/empty_obj_data.gw +++ b/tests/error/empty_obj_data.gw @@ -1,8 +1,8 @@ #! [contains] NullPtrException class C { - int i; + var int i; } -C ref c; +ref C c; c.i; diff --git a/tests/error/empty_ptr.gw b/tests/error/empty_ptr.gw index 052bbb2d..3a9e0a41 100644 --- a/tests/error/empty_ptr.gw +++ b/tests/error/empty_ptr.gw @@ -1,3 +1,3 @@ #! [contains] EmptyPointerException -<~int~>Ptr t; +var <~int~>Ptr t; <<< *t >>>; diff --git a/tests/error/enum_declared.gw b/tests/error/enum_declared.gw index 45251c5b..9bb79ecd 100644 --- a/tests/error/enum_declared.gw +++ b/tests/error/enum_declared.gw @@ -1,5 +1,5 @@ #! [contains] already been defined -int i; +var int i; enum i { test diff --git a/tests/error/ev.gw b/tests/error/ev.gw index 974c769d..1508bd6a 100644 --- a/tests/error/ev.gw +++ b/tests/error/ev.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -Event ref e; +ref Event e; e => now; diff --git a/tests/error/fail_assign.gw b/tests/error/fail_assign.gw index 3fd3131b..cd1db1a2 100644 --- a/tests/error/fail_assign.gw +++ b/tests/error/fail_assign.gw @@ -1,3 +1,3 @@ #! [contains] can't assign class C extends Event{} -Event e @=> C o; +var Event e @=> var C o; diff --git a/tests/error/find_type.gw b/tests/error/find_type.gw index a83176e7..b587462f 100644 --- a/tests/error/find_type.gw +++ b/tests/error/find_type.gw @@ -1,4 +1,4 @@ #! [contains] unknown type class C extends UGen { - D d; + var D d; } diff --git a/tests/error/fptr_other_class.gw b/tests/error/fptr_other_class.gw index ebc54691..021af700 100644 --- a/tests/error/fptr_other_class.gw +++ b/tests/error/fptr_other_class.gw @@ -4,5 +4,5 @@ class C { } class D { typedef void t_ptr(); - C->t_ptr ptr; + var C.t_ptr ptr; } diff --git a/tests/error/func_arg_unknown.gw b/tests/error/func_arg_unknown.gw index bde6775b..4bed9c55 100644 --- a/tests/error/func_arg_unknown.gw +++ b/tests/error/func_arg_unknown.gw @@ -1,2 +1,2 @@ #! [contains] unknown type - fun void my_func(unknown_type unknown_arg){} +fun void my_func(unknown_type unknown_arg){} diff --git a/tests/error/func_error_scan2.gw b/tests/error/func_error_scan2.gw index 5b621ace..14d7396b 100644 --- a/tests/error/func_error_scan2.gw +++ b/tests/error/func_error_scan2.gw @@ -1,2 +1,2 @@ #! [contains] unknown type -fun void test() { skfuv sd; } +fun void test() { var skfuv sd; } diff --git a/tests/error/func_non.gw b/tests/error/func_non.gw index a4a97f4a..6e848c96 100644 --- a/tests/error/func_non.gw +++ b/tests/error/func_non.gw @@ -1,2 +1,2 @@ #! [contains] function call using a non-function value - null(); +null(); diff --git a/tests/error/func_ptr_empty.gw b/tests/error/func_ptr_empty.gw index 309c711b..de60b4c4 100644 --- a/tests/error/func_ptr_empty.gw +++ b/tests/error/func_ptr_empty.gw @@ -1,4 +1,4 @@ #! [contains] NullPtrException typedef void Test(); -Test test; +var Test test; test(); diff --git a/tests/error/func_ret_array_empty.gw b/tests/error/func_ret_array_empty.gw index dd326cf2..76c9a488 100644 --- a/tests/error/func_ret_array_empty.gw +++ b/tests/error/func_ret_array_empty.gw @@ -1,2 +1,2 @@ #! [contains] must be defined with empty - fun int[1] my_func(int i[]){} +fun int[1] my_func(int i[]){} diff --git a/tests/error/func_unknown_ret.gw b/tests/error/func_unknown_ret.gw index 5574068c..028f6e2b 100644 --- a/tests/error/func_unknown_ret.gw +++ b/tests/error/func_unknown_ret.gw @@ -1,2 +1,2 @@ #! [contains] unknown type - fun unknwon_type my_function(){} +fun unknwon_type my_function(){} diff --git a/tests/error/function_arg_no_size.gw b/tests/error/function_arg_no_size.gw index f3ee9cee..04993ada 100644 --- a/tests/error/function_arg_no_size.gw +++ b/tests/error/function_arg_no_size.gw @@ -1,2 +1,2 @@ #! [contains] cannot declare variables of size - fun void test(void v){} +fun void test(void v){} diff --git a/tests/error/function_nested.gw b/tests/error/function_nested.gw index 0ce4549b..68d90013 100644 --- a/tests/error/function_nested.gw +++ b/tests/error/function_nested.gw @@ -1,5 +1,4 @@ -#! [contains] - fun void test() -{ +#! [contains] +fun void test() { fun void nested(){} } diff --git a/tests/error/function_used.gw b/tests/error/function_used.gw index 2fbbf696..89887f1d 100644 --- a/tests/error/function_used.gw +++ b/tests/error/function_used.gw @@ -1,3 +1,3 @@ #! [contains] has already been defined in the same scope -int i; +var int i; fun void i(){} diff --git a/tests/error/implicit_inside.gw b/tests/error/implicit_inside.gw index f3ca145a..c9729f66 100644 --- a/tests/error/implicit_inside.gw +++ b/tests/error/implicit_inside.gw @@ -1,2 +1,11 @@ #! [contains] while defining -class C{0=>int i;}operator@implicit int(C c){return c;i;}fun void test(int i){<<>>;}C c;c=>test; +class C { + 0 => var int i; +} +operator @implicit int(C c) { + return c; +} + +fun void test(int i){<<>>;} +var C c; +c=>test; diff --git a/tests/error/invalid_array_acces.gw b/tests/error/invalid_array_acces.gw index 76cfbc3e..acfa9821 100644 --- a/tests/error/invalid_array_acces.gw +++ b/tests/error/invalid_array_acces.gw @@ -1,3 +1,3 @@ #! [contains] invalid array acces expression -int j[]; +var int j[]; j[1,2,3,4] @=> i; diff --git a/tests/error/invalid_array_shift.gw b/tests/error/invalid_array_shift.gw index dbe566cc..bfd1e0e4 100644 --- a/tests/error/invalid_array_shift.gw +++ b/tests/error/invalid_array_shift.gw @@ -1,3 +1,3 @@ #! [contains] array depths do not match -int i[2][2]; +var int i[2][2]; i << 2; diff --git a/tests/error/invalid_cast.gw b/tests/error/invalid_cast.gw index fb8b3eca..bccad926 100644 --- a/tests/error/invalid_cast.gw +++ b/tests/error/invalid_cast.gw @@ -1,5 +1,5 @@ #! [contains] can't cast class C {} class D {} -D d; +var D d; d $ C; diff --git a/tests/error/invalid_global_class.gw b/tests/error/invalid_global_class.gw index a20ed9c0..38b1bcb5 100644 --- a/tests/error/invalid_global_class.gw +++ b/tests/error/invalid_global_class.gw @@ -1,6 +1,6 @@ #! [contains] 'global' can only be used at class scope class C { { - global int i; + global var int i; } } diff --git a/tests/error/invalid_global_file.gw b/tests/error/invalid_global_file.gw index c8eeaa35..8f3884ac 100644 --- a/tests/error/invalid_global_file.gw +++ b/tests/error/invalid_global_file.gw @@ -1,4 +1,4 @@ #! [contains] 'global' can only be used at file scope { -global int i; +global var int i; } diff --git a/tests/error/lambda_mismatch2.gw b/tests/error/lambda_mismatch2.gw index 2f3fb527..397401df 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); -\a b { <<< a, " ", b >>>; } @=> ptr_t ptr; +\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 572051d6..38c2671e 100644 --- a/tests/error/lambda_mismatch3.gw +++ b/tests/error/lambda_mismatch3.gw @@ -1,6 +1,6 @@ #! [contains] argument number does not match for lambda typedef void ptr_t(int i); -\a b { <<< a, " ", b >>>; } @=> ptr_t ptr; +\a b { <<< a, " ", b >>>; } @=> var ptr_t ptr; fun void test(ptr_t p) { p(2); } diff --git a/tests/error/member_from_static.gw b/tests/error/member_from_static.gw index 8af9f87d..f14fd9da 100644 --- a/tests/error/member_from_static.gw +++ b/tests/error/member_from_static.gw @@ -1,6 +1,6 @@ #! [contains] class C { - int i; + var int i; fun static void test() { <<< i >>>; } diff --git a/tests/error/multi_decl.gw b/tests/error/multi_decl.gw index fd79b7e8..4b87538c 100644 --- a/tests/error/multi_decl.gw +++ b/tests/error/multi_decl.gw @@ -1,2 +1,2 @@ #! [contains] from/to a multi-variable declaration -int i, ii => float f; +var int i, ii => var float f; diff --git a/tests/error/name_conflict.gw b/tests/error/name_conflict.gw index 8342f0e6..ea409add 100644 --- a/tests/error/name_conflict.gw +++ b/tests/error/name_conflict.gw @@ -1,6 +1,6 @@ #! [contains] conflicts with previously defined value class C { - int test; + var int test; } class D extends C { diff --git a/tests/error/negative_array.gw b/tests/error/negative_array.gw index 66a272cc..1bc98c37 100644 --- a/tests/error/negative_array.gw +++ b/tests/error/negative_array.gw @@ -1,3 +1,3 @@ #! [contains] NegativeArraySize: while allocating arrays -int i[-1]; +var int i[-1]; <<< i >>>; diff --git a/tests/error/negative_array2.gw b/tests/error/negative_array2.gw index c7c868dc..bc7fdf53 100644 --- a/tests/error/negative_array2.gw +++ b/tests/error/negative_array2.gw @@ -1,4 +1,4 @@ #! [contains] ArrayOutofBounds -int i[2][2]; +var int i[2][2]; <<< i[1][-1] >>>; <<< -1 >>>; diff --git a/tests/error/no_cast.gw b/tests/error/no_cast.gw index 40b5cda6..b7527c49 100644 --- a/tests/error/no_cast.gw +++ b/tests/error/no_cast.gw @@ -2,7 +2,7 @@ class C{} class D{} -C c; -D d; +var C c; +var D d; <<< c $ D >>>; <<< d >>>; diff --git a/tests/error/no_member.gw b/tests/error/no_member.gw index 6175713a..332cd478 100644 --- a/tests/error/no_member.gw +++ b/tests/error/no_member.gw @@ -1,4 +1,4 @@ #! [contains] does not have members - invalid use in dot expression -int i; -i.nothing; +var int i; +i.nothing; diff --git a/tests/error/no_namespace.gw b/tests/error/no_namespace.gw index e2dd9440..332a7d54 100644 --- a/tests/error/no_namespace.gw +++ b/tests/error/no_namespace.gw @@ -2,4 +2,4 @@ class C{ class private D{} } -int->D d; +var int.D d; diff --git a/tests/error/non_function_template.gw b/tests/error/non_function_template.gw index 78b28cca..9860779a 100644 --- a/tests/error/non_function_template.gw +++ b/tests/error/non_function_template.gw @@ -1,3 +1,3 @@ #! [contains] template call of non-function value -int test; +var int test; test<~int~>(); diff --git a/tests/error/non_public_typedef_global_scope.gw b/tests/error/non_public_typedef_global_scope.gw index c8504e82..2eaf874e 100644 --- a/tests/error/non_public_typedef_global_scope.gw +++ b/tests/error/non_public_typedef_global_scope.gw @@ -2,5 +2,5 @@ class C { typedef void t_ptr(); } -C->t_ptr ptr; +var C.t_ptr ptr; ptr(); diff --git a/tests/error/non_static_from_member.gw b/tests/error/non_static_from_member.gw index a08ab169..e4eaf864 100644 --- a/tests/error/non_static_from_member.gw +++ b/tests/error/non_static_from_member.gw @@ -1,5 +1,5 @@ #! [contains] non-static member 'i' used from static function class C { - int i; + var int i; fun static void test() { <<< i >>>; } } diff --git a/tests/error/nonnull_class_extend.gw b/tests/error/nonnull_class_extend.gw index dde54194..77dd193c 100644 --- a/tests/error/nonnull_class_extend.gw +++ b/tests/error/nonnull_class_extend.gw @@ -1,4 +1,4 @@ #! [contains] can't use nonnull type in class extend -class C extends Object nonnull { +class C extends nonnull Object { } diff --git a/tests/error/not_global.gw b/tests/error/not_global.gw index e5ac6bbd..12d4beb0 100644 --- a/tests/error/not_global.gw +++ b/tests/error/not_global.gw @@ -3,4 +3,4 @@ class C { } -global C c; +global var C c; diff --git a/tests/error/null_array_access.gw b/tests/error/null_array_access.gw index 7b1a534c..108472f4 100644 --- a/tests/error/null_array_access.gw +++ b/tests/error/null_array_access.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -int i[]; +var int i[]; i[0]; diff --git a/tests/error/null_array_access_multi.gw b/tests/error/null_array_access_multi.gw index 03a570ba..4995d847 100644 --- a/tests/error/null_array_access_multi.gw +++ b/tests/error/null_array_access_multi.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -int i[][]; +var int i[][]; i[0][0]; diff --git a/tests/error/null_auto.gw b/tests/error/null_auto.gw index 08638ea7..ddcbbe61 100644 --- a/tests/error/null_auto.gw +++ b/tests/error/null_auto.gw @@ -1,4 +1,4 @@ #! [contains] NullPtrException -int i[]; +var int i[]; foreach(a : i) <<< a >>>; diff --git a/tests/error/op_match.gw b/tests/error/op_match.gw index 9abaf80c..dfccfc34 100644 --- a/tests/error/op_match.gw +++ b/tests/error/op_match.gw @@ -1,3 +1,3 @@ #! [contains] no match found for operator - Object o; +var Object o; null +=> o; diff --git a/tests/error/op_test.gw b/tests/error/op_test.gw index 0d1777b3..608bbc9c 100644 --- a/tests/error/op_test.gw +++ b/tests/error/op_test.gw @@ -4,6 +4,6 @@ class C } -C c[1]; -C d[2][4]; +var C c[1]; +var C d[2][4]; c => d; diff --git a/tests/error/override_confict.gw b/tests/error/override_confict.gw index 9b8eb68c..31a19897 100644 --- a/tests/error/override_confict.gw +++ b/tests/error/override_confict.gw @@ -1,7 +1,7 @@ #! [contains] conflicts with previously defined value class C { - int test; + var int test; } class D extends C @@ -9,7 +9,7 @@ class D extends C fun void test() {} } -C c; -D d; +var C c; +var D d; <<< c >>>; -<<< d >>>; \ No newline at end of file +<<< d >>>; diff --git a/tests/error/postfix_no_match.gw b/tests/error/postfix_no_match.gw index f64c7982..06a77ed5 100644 --- a/tests/error/postfix_no_match.gw +++ b/tests/error/postfix_no_match.gw @@ -1,3 +1,3 @@ #! [contains] no match found for operator -Object o; +var Object o; o++; diff --git a/tests/error/private.gw b/tests/error/private.gw index 87909a51..ec3add2b 100644 --- a/tests/error/private.gw +++ b/tests/error/private.gw @@ -1,5 +1,5 @@ #! [contains] can't access private -class C { private int i; } +class C { private var int i; } -C c; +var C c; <<< c.i >>>; diff --git a/tests/error/private_func_call_out.gw b/tests/error/private_func_call_out.gw index b2e66f02..d616d085 100644 --- a/tests/error/private_func_call_out.gw +++ b/tests/error/private_func_call_out.gw @@ -3,5 +3,5 @@ class C { fun private void test(){} } -C c; +var C c; c.test(); diff --git a/tests/error/private_func_nocall_out.gw b/tests/error/private_func_nocall_out.gw index 5c090166..c28529cb 100644 --- a/tests/error/private_func_nocall_out.gw +++ b/tests/error/private_func_nocall_out.gw @@ -3,5 +3,5 @@ class C { fun private void test(){} } -C c; +var C c; c.test; diff --git a/tests/error/private_global.gw b/tests/error/private_global.gw index b656e00b..c473d576 100644 --- a/tests/error/private_global.gw +++ b/tests/error/private_global.gw @@ -1,2 +1,2 @@ #! [contains] can only be used at class scope -private int i; +private var int i; diff --git a/tests/error/private_other.gw b/tests/error/private_other.gw index f9ab4063..f9be3a75 100644 --- a/tests/error/private_other.gw +++ b/tests/error/private_other.gw @@ -1,7 +1,7 @@ #! [contains] can't access private -class C { private int i; } +class C { private var int i; } class D { - C c; + var C c; <<< c.i >>>; } diff --git a/tests/error/private_type_err.gw b/tests/error/private_type_err.gw index 4aff3549..34b7a2f6 100644 --- a/tests/error/private_type_err.gw +++ b/tests/error/private_type_err.gw @@ -4,4 +4,4 @@ class C { } } -C->D d; +var C.D d; diff --git a/tests/error/protect_type_err.gw b/tests/error/protect_type_err.gw index 90e98bb9..fb6378bb 100644 --- a/tests/error/protect_type_err.gw +++ b/tests/error/protect_type_err.gw @@ -4,4 +4,4 @@ class C { } } -C->D d; +var C.D d; diff --git a/tests/error/ptr_assign_const.gw b/tests/error/ptr_assign_const.gw index b0da376b..8b75ba44 100644 --- a/tests/error/ptr_assign_const.gw +++ b/tests/error/ptr_assign_const.gw @@ -1 +1 @@ -1 :=> <~int~>Ptr pd; +1 :=> var <~int~>Ptr pd; diff --git a/tests/error/ptr_assign_global.gw b/tests/error/ptr_assign_global.gw index 1f5e985e..0d065dc0 100644 --- a/tests/error/ptr_assign_global.gw +++ b/tests/error/ptr_assign_global.gw @@ -1,9 +1,9 @@ #! [contains] can't assign non member function to member function pointer class C { typedef void Test(); - Test test; + var Test test; } fun void test(){} -C c; +var C c; test @=> c.test; diff --git a/tests/error/ptr_assign_invalid.gw b/tests/error/ptr_assign_invalid.gw index 9ac24209..d0ee84dc 100644 --- a/tests/error/ptr_assign_invalid.gw +++ b/tests/error/ptr_assign_invalid.gw @@ -2,5 +2,5 @@ class C {} class D extends C {} -D d; -d :=> <~int~>Ptr pd; +var D d; +d :=> var <~int~>Ptr pd; diff --git a/tests/error/ptr_assign_member.gw b/tests/error/ptr_assign_member.gw index b97d13ed..6e3746a9 100644 --- a/tests/error/ptr_assign_member.gw +++ b/tests/error/ptr_assign_member.gw @@ -1,9 +1,9 @@ #! [contains] can't assign member function to non member function pointer typedef void Test(); -Test test; +var Test test; class D { fun void test(){} } -D d; +var D d; d.test @=> test; diff --git a/tests/error/ptr_assign_other.gw b/tests/error/ptr_assign_other.gw index 4b3e5ee1..d4010091 100644 --- a/tests/error/ptr_assign_other.gw +++ b/tests/error/ptr_assign_other.gw @@ -1,13 +1,13 @@ #! [contains] can't assign member function to a pointer of an other class class C { typedef void Test(); - Test test; + var Test test; } class D { fun void test(){} } -C c; -D d; +var C c; +var D d; <<< d.test @=> c.test >>>; diff --git a/tests/error/ptr_defined.gw b/tests/error/ptr_defined.gw index 1338a775..70eef520 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 -int i; +var int i; typedef void i(); diff --git a/tests/error/ptr_from_const.gw b/tests/error/ptr_from_const.gw index 63844392..ece1104f 100644 --- a/tests/error/ptr_from_const.gw +++ b/tests/error/ptr_from_const.gw @@ -1 +1 @@ -1 :=> <~int~>Ptr i; +1 :=> var <~int~>Ptr i; diff --git a/tests/error/ptr_no_match.gw b/tests/error/ptr_no_match.gw index d0818146..91897137 100644 --- a/tests/error/ptr_no_match.gw +++ b/tests/error/ptr_no_match.gw @@ -3,5 +3,5 @@ fun void test(int i){} fun void test(float f){} typedef void Test(); -Test t; +var Test t; test @=> t; diff --git a/tests/error/recursive_class_def.gw b/tests/error/recursive_class_def.gw index 7d78cac3..dd5a6d81 100644 --- a/tests/error/recursive_class_def.gw +++ b/tests/error/recursive_class_def.gw @@ -5,11 +5,11 @@ class E extends F {} class F extends E {} class G extends C {} -C c; -D d; -E e; -F f; -G g; +var C c; +var D d; +var E e; +var F f; +var G g; <<< f $ D >>>; <<< [ f, g ] >>>; <<< maybe ? f : D >>>; diff --git a/tests/error/spork_non_func.gw b/tests/error/spork_non_func.gw index 96f996db..d9fb36fe 100644 --- a/tests/error/spork_non_func.gw +++ b/tests/error/spork_non_func.gw @@ -1,4 +1,4 @@ #! [contains] only function calls can be sporked -int i; +var int i; <<< i >>>; spork i; diff --git a/tests/error/static_out.gw b/tests/error/static_out.gw index 294b07ef..47b52b38 100644 --- a/tests/error/static_out.gw +++ b/tests/error/static_out.gw @@ -1,2 +1,2 @@ #! [contains] can only be used at class scope -static int i; +static var int i; diff --git a/tests/error/template_class_no_type.gw b/tests/error/template_class_no_type.gw index 40b87094..aebe2574 100644 --- a/tests/error/template_class_no_type.gw +++ b/tests/error/template_class_no_type.gw @@ -1,6 +1,6 @@ #! [contains] you must provide template types class<~A~> C { - A a; + var A a; } -C c; +var C c; diff --git a/tests/error/template_dyn2.gw b/tests/error/template_dyn2.gw index 32bbf37a..6f314a78 100644 --- a/tests/error/template_dyn2.gw +++ b/tests/error/template_dyn2.gw @@ -17,9 +17,9 @@ class E extends D { } -<<< C c >>>; -<<< D d >>>; -<<< E e >>>; +<<< var C c >>>; +<<< var D d >>>; +<<< var E e >>>; test(c); test(d); diff --git a/tests/error/template_no_match.gw b/tests/error/template_no_match.gw index 82fef43a..dc7bff3b 100644 --- a/tests/error/template_no_match.gw +++ b/tests/error/template_no_match.gw @@ -3,7 +3,7 @@ class C { fun void test<~A~>(float f) {} fun void test<~A~>() {} } -C c; +var C c; #!c.test<~int~>(); c.test<~int~>(2.3); c.test<~int~>(2.3, 2.3); diff --git a/tests/error/type_not_template.gw b/tests/error/type_not_template.gw index adbbf23c..248192a1 100644 --- a/tests/error/type_not_template.gw +++ b/tests/error/type_not_template.gw @@ -1,2 +1,2 @@ #! [contains] is not template -<~int~>Object o; +var <~int~>Object o; diff --git a/tests/error/type_path_test.gw b/tests/error/type_path_test.gw index a12af900..dcb64b42 100644 --- a/tests/error/type_path_test.gw +++ b/tests/error/type_path_test.gw @@ -1,2 +1,2 @@ #! [contains] unknown type -fun void test(B->C a){} +fun void test(B.C a){} diff --git a/tests/error/typedef_func_tmpl_types.gw b/tests/error/typedef_func_tmpl_types.gw index 39d29bdd..e0b4cced 100644 --- a/tests/error/typedef_func_tmpl_types.gw +++ b/tests/error/typedef_func_tmpl_types.gw @@ -1,10 +1,10 @@ #! [contains] pre-defined types typedef void t_ptr<~A~>(); -<~int~>t_ptr iptr; +var <~int~>t_ptr iptr; fun void test<~A~>() { - A a; + var A a; <<< __func__, " ", a>>>; } diff --git a/tests/error/typedef_func_tmpl_types2.gw b/tests/error/typedef_func_tmpl_types2.gw index 5a8210aa..0523f5fc 100644 --- a/tests/error/typedef_func_tmpl_types2.gw +++ b/tests/error/typedef_func_tmpl_types2.gw @@ -6,7 +6,7 @@ fun void test<~A~>() { <<< __func__ >>>; } -test @=> B b; +test @=> var B b; #!<<< iptr<~int~>() >>>; <<< b() >>>; <<< b<~int~>() >>>; diff --git a/tests/error/typeof_error.gw b/tests/error/typeof_error.gw index a621e38e..711db226 100644 --- a/tests/error/typeof_error.gw +++ b/tests/error/typeof_error.gw @@ -1 +1 @@ -typeof( 1 + 2 ) i; \ No newline at end of file +var typeof( 1 + 2 ) i; diff --git a/tests/error/unary_times.gw b/tests/error/unary_times.gw index 4c296607..1b71930f 100644 --- a/tests/error/unary_times.gw +++ b/tests/error/unary_times.gw @@ -1,3 +1,3 @@ #! [contains] no match found for operator -int i; +var int i; *i; diff --git a/tests/error/undef_parent.gw b/tests/error/undef_parent.gw index 228a53ad..b4ca2ac7 100644 --- a/tests/error/undef_parent.gw +++ b/tests/error/undef_parent.gw @@ -1,4 +1,4 @@ #! [contains] unknown type class C extends Undefined {} -C c; -<<< c >>>; \ No newline at end of file +var C c; +<<< c >>>; diff --git a/tests/error/union.gw b/tests/error/union.gw index 2987f24e..0e4bd71e 100644 --- a/tests/error/union.gw +++ b/tests/error/union.gw @@ -1,5 +1,5 @@ #! [contains] - union +union { one; two; }; diff --git a/tests/error/unknown_type.gw b/tests/error/unknown_type.gw index 92c1f3fa..1d19203a 100644 --- a/tests/error/unknown_type.gw +++ b/tests/error/unknown_type.gw @@ -1,3 +1,3 @@ #! [contains] unknown type #! hit the error with an unknown type -unknown_type variable; +var unknown_type variable; diff --git a/tests/error/var_defined.gw b/tests/error/var_defined.gw index 51811b01..5d3ab012 100644 --- a/tests/error/var_defined.gw +++ b/tests/error/var_defined.gw @@ -1,3 +1,3 @@ #! [contains] has already been defined in the same scope -int i; -int i; +var int i; +var int i; diff --git a/tests/error/without_instance.gw b/tests/error/without_instance.gw index 92fc4ec0..338ce531 100644 --- a/tests/error/without_instance.gw +++ b/tests/error/without_instance.gw @@ -1,6 +1,6 @@ #! [contains] cannot access member class C { - int i; + var int i; } C.i; diff --git a/tests/fork/fork.gw b/tests/fork/fork.gw index 63256ea8..2b3ba86b 100644 --- a/tests/fork/fork.gw +++ b/tests/fork/fork.gw @@ -3,7 +3,7 @@ fork { 12::samp => now; me.test_cancel(); <<< "stop" >>>; -} @=> Fork ref f; +} @=> ref Fork f; 1 => f.set_cancel; 2::samp => now; diff --git a/tests/fork/fork_call.gw b/tests/fork/fork_call.gw index 9f01711f..03ada613 100644 --- a/tests/fork/fork_call.gw +++ b/tests/fork/fork_call.gw @@ -3,7 +3,7 @@ fun int test() { return 12; } -fork test() @=> <~int~>TypedFork ref sh; +fork test() @=> ref <~int~>TypedFork sh; <<< typeof(sh) >>>; sh.ev => now; <<< sh.retval >>>; diff --git a/tests/fork/fork_join.gw b/tests/fork/fork_join.gw index e0b85d7e..ad332af1 100644 --- a/tests/fork/fork_join.gw +++ b/tests/fork/fork_join.gw @@ -1,3 +1,3 @@ -fork { <<< __func__ >>>; } @=> Fork ref f; +fork { <<< __func__ >>>; } @=> ref Fork f; second => now; f.join(); diff --git a/tests/fork/fork_join2.gw b/tests/fork/fork_join2.gw index dd8d58f0..146014e2 100644 --- a/tests/fork/fork_join2.gw +++ b/tests/fork/fork_join2.gw @@ -1,2 +1,2 @@ -fork { <<< __func__ >>>; minute => now; } @=> Fork ref f; +fork { <<< __func__ >>>; minute => now; } @=> ref Fork f; f.join(); diff --git a/tests/fptr/class_ptr01.gw b/tests/fptr/class_ptr01.gw index a0f286a6..895f11b4 100644 --- a/tests/fptr/class_ptr01.gw +++ b/tests/fptr/class_ptr01.gw @@ -2,9 +2,9 @@ class C { fun static void test(int i) { <<< "int arg" >>>; } typedef void PtrType(int i); - test @=> PtrType p; + test @=> var PtrType p; p(1); test @=> p; p(1); } -C c; +var C c; diff --git a/tests/fptr/class_ptr1.gw b/tests/fptr/class_ptr1.gw index f964e588..60c2c8be 100644 --- a/tests/fptr/class_ptr1.gw +++ b/tests/fptr/class_ptr1.gw @@ -2,9 +2,10 @@ class C { fun void test(int i) { <<< "int arg" >>>; } typedef static void PtrType(int i); test @=> - PtrType p; + var PtrType p; p(1); test @=> p; p(1); } -C c; + +var C c; diff --git a/tests/fptr/class_ptr2.gw b/tests/fptr/class_ptr2.gw index 5bcd7954..3998bb63 100644 --- a/tests/fptr/class_ptr2.gw +++ b/tests/fptr/class_ptr2.gw @@ -1,9 +1,10 @@ class C { fun void test(int i) { <<< "int arg" >>>; } typedef void PtrType(int i); - test @=> static PtrType p; + test @=> static var PtrType p; p(1); test @=> p; p(1); } -C c; + +var C c; diff --git a/tests/fptr/class_ptr3.gw b/tests/fptr/class_ptr3.gw index d1ed9ee6..96b66cfe 100644 --- a/tests/fptr/class_ptr3.gw +++ b/tests/fptr/class_ptr3.gw @@ -1,10 +1,11 @@ class C { fun static void test(int i) { <<< "int arg" >>>; } typedef static void PtrType(int i); - test @=> static PtrType p; + test @=> static var PtrType p; p(1); test @=> p; p(1); } -C c; + +var C c; <<< c >>>; diff --git a/tests/fptr/class_ptr31.gw b/tests/fptr/class_ptr31.gw index 6c9a1571..afaeb1a7 100644 --- a/tests/fptr/class_ptr31.gw +++ b/tests/fptr/class_ptr31.gw @@ -2,9 +2,10 @@ class C { fun void test(int i) { <<< "int arg" >>>; } typedef static void PtrType(int i); - test @=> static PtrType p; + test @=> static var PtrType p; p(1); test @=> p; p(1); } -C c; + +var C c; diff --git a/tests/fptr/fptr_class_type.gw b/tests/fptr/fptr_class_type.gw index 6b7a1b46..ef3c6fa0 100644 --- a/tests/fptr/fptr_class_type.gw +++ b/tests/fptr/fptr_class_type.gw @@ -1,2 +1,2 @@ typedef void ptr_t(); -ptr_t t @=> ptr_t t2; +var ptr_t t @=> var ptr_t t2; diff --git a/tests/fptr/generated.gw b/tests/fptr/generated.gw index 39055803..80226ebb 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 @=> auto p; +test @=> var auto p; p(); diff --git a/tests/import/callback2.gw b/tests/import/callback2.gw index e033c6ac..e1ed907a 100644 --- a/tests/import/callback2.gw +++ b/tests/import/callback2.gw @@ -1,6 +1,6 @@ fun int test(int i) { <<< "test with arg ", i >>>; } -PtrTypeI p; +var PtrTypeI p; test @=> p; <<< test >>>; <<< p >>>; diff --git a/tests/import/class_template.gw b/tests/import/class_template.gw index cc6dc083..c86a9339 100644 --- a/tests/import/class_template.gw +++ b/tests/import/class_template.gw @@ -7,7 +7,7 @@ #!<<< c2 >>>; #!<<< c2.value >>>; -<~int, int~>ClassTemplate ct; +var <~int, int~>ClassTemplate ct; <<< ct.key >>>; #!ClassTemplate ct2; #!<<< ct2.key >>>; diff --git a/tests/import/coverage.gw b/tests/import/coverage.gw index 7b1227dc..99b0ccf1 100644 --- a/tests/import/coverage.gw +++ b/tests/import/coverage.gw @@ -1,5 +1,5 @@ -<<< float f >>>; -Coverage c; +<<< var float f >>>; +var Coverage c; c.s_i; <<< Coverage.i() >>>; <<< Coverage.f() >>>; diff --git a/tests/import/extend_array.gw b/tests/import/extend_array.gw index 125a9fd5..d99718ce 100644 --- a/tests/import/extend_array.gw +++ b/tests/import/extend_array.gw @@ -1,3 +1,3 @@ -ArrayExt a; +var ArrayExt a; <<< a >>>; <<< a.size() >>>; diff --git a/tests/import/fptr.gw b/tests/import/fptr.gw index 28639334..0acefb39 100644 --- a/tests/import/fptr.gw +++ b/tests/import/fptr.gw @@ -1,5 +1,5 @@ fun void test(){ <<< "test" >>>; } -PtrType ptr; +var PtrType ptr; test(); test @=> ptr; ptr(); @@ -7,7 +7,7 @@ ptr(); FuncTypedef.test_func(); <<< FuncTypedef.test_func @=> FuncTypedef.ptr >>>; - _ptr; +var FuncTypedef.PtrType _ptr; <<< FuncTypedef.ptr >>>; FuncTypedef.ptr(); diff --git a/tests/import/map2.gw b/tests/import/map2.gw index 6ffb0576..08ea9faa 100644 --- a/tests/import/map2.gw +++ b/tests/import/map2.gw @@ -1,4 +1,4 @@ -<~int, float~>Map pp; +var <~int, float~>Map pp; <<< pp >>>; <<< pp.size() >>>; <<< pp.set(1, 2) >>>; diff --git a/tests/import/trig.gw b/tests/import/trig.gw index c56299b3..cbc5f36e 100644 --- a/tests/import/trig.gw +++ b/tests/import/trig.gw @@ -1,8 +1,8 @@ -Trig trig => dac; +var Trig trig => dac; adc :=> trig; adc :=< trig; -Trig2 trig2 => dac; +var Trig2 trig2 => dac; adc :=> trig2; adc :=< trig2; diff --git a/tests/import/typedef.gw b/tests/import/typedef.gw index 7cbe1087..ea3d603e 100644 --- a/tests/import/typedef.gw +++ b/tests/import/typedef.gw @@ -1,4 +1,4 @@ -Typedef t; +var Typedef t; #!fun int test(int i) { <<< i >>>; } #!test @=> t; <<< t >>>; diff --git a/tests/import/union.gw b/tests/import/union.gw index 1d9f3a1b..d32885de 100644 --- a/tests/import/union.gw +++ b/tests/import/union.gw @@ -1,4 +1,4 @@ -Union u; +var Union u; <<< u.i >>>; <<< 12 => u.f >>>; <<< 1 => u.i >>>; diff --git a/tests/import/union_tmpl.gw b/tests/import/union_tmpl.gw index 3650e773..fcb69de5 100644 --- a/tests/import/union_tmpl.gw +++ b/tests/import/union_tmpl.gw @@ -1,2 +1,2 @@ -<<< <~Event~>U u>>>; +<<< var <~Event~>U u>>>; <<< u.a >>>; diff --git a/tests/import/variadic.gw b/tests/import/variadic.gw index 00477db7..3213c303 100644 --- a/tests/import/variadic.gw +++ b/tests/import/variadic.gw @@ -1,6 +1,6 @@ <<< "test builtin variadic fun" >>>; -Variadic v; -"iiii" => string format; +var Variadic v; +"iiii" => var string format; <<< v, " ", format $ Object >>>; v.member(format, 1,2,3,4); v.member(format, 1,2,3,4); diff --git a/tests/internal_op/cast_similar.gw b/tests/internal_op/cast_similar.gw index 19d4a1fd..ecee1b1d 100644 --- a/tests/internal_op/cast_similar.gw +++ b/tests/internal_op/cast_similar.gw @@ -1,3 +1,3 @@ typedef int INT; -INT i; +var INT i; <<< i $ int >>>; diff --git a/tests/internal_op/conditionnal.gw b/tests/internal_op/conditionnal.gw index acbd9dc2..e4b94b48 100644 --- a/tests/internal_op/conditionnal.gw +++ b/tests/internal_op/conditionnal.gw @@ -1,5 +1,7 @@ #! [contains] 1 -class C { 10 => int i; } +class C { + 10 => var int i; +} operator @conditionnal int(C c) { <<< __func__ >>>; @@ -7,5 +9,5 @@ operator @conditionnal int(C c) { return c.i; } -C c; +var C c; while(c) <<>>; diff --git a/tests/internal_op/implicit.gw b/tests/internal_op/implicit.gw index dc7f42f0..3be1be61 100644 --- a/tests/internal_op/implicit.gw +++ b/tests/internal_op/implicit.gw @@ -1,6 +1,6 @@ #! [contains] 12 class C { - 12 => int i; + 12 => var int i; } operator @implicit int (C c) { @@ -8,5 +8,5 @@ operator @implicit int (C c) { } fun void test(int i) { <<< i >>>; } -C c; +var C c; c => test; diff --git a/tests/internal_op/implicit_similar.gw b/tests/internal_op/implicit_similar.gw index 01b26b75..02a97acf 100644 --- a/tests/internal_op/implicit_similar.gw +++ b/tests/internal_op/implicit_similar.gw @@ -2,4 +2,4 @@ typedef int INT; fun void test(INT i) { <<< i >>>; } fun void test2(int i) { <<< i >>>; } 1 => test; -INT i => test2; +var INT i => test2; diff --git a/tests/internal_op/internal_gack.gw b/tests/internal_op/internal_gack.gw index 40f8fecb..97722cf3 100644 --- a/tests/internal_op/internal_gack.gw +++ b/tests/internal_op/internal_gack.gw @@ -1,5 +1,5 @@ class C { operator @gack void() { <<< __func__ >>>; } } -<<< C c >>>; +<<< var C c >>>; <<< c >>>; diff --git a/tests/internal_op/unconditionnal.gw b/tests/internal_op/unconditionnal.gw index 623a1d0c..cf90a464 100644 --- a/tests/internal_op/unconditionnal.gw +++ b/tests/internal_op/unconditionnal.gw @@ -1,5 +1,7 @@ #! [contains] 1 -class C { 10 => int i; } +class C { + 10 => var int i; +} operator @unconditionnal int(C c) { <<< __func__ >>>; @@ -7,5 +9,5 @@ operator @unconditionnal int(C c) { return !c.i; } -C c; +var C c; until(c) <<>>; diff --git a/tests/interp/exp.gw b/tests/interp/exp.gw index 264cf7b4..dd295f44 100644 --- a/tests/interp/exp.gw +++ b/tests/interp/exp.gw @@ -1,3 +1,3 @@ #! [contains] Hello, interpolation! 1 -1 => int my; +1 => var int my; <<< `Hello, interpolation! ${ my }` >>>; diff --git a/tests/interp/exp_lit.gw b/tests/interp/exp_lit.gw index d57d2055..4348ea47 100644 --- a/tests/interp/exp_lit.gw +++ b/tests/interp/exp_lit.gw @@ -1,3 +1,3 @@ #! [contains] 1 Hello, interpolation! -1 => int my; +1 => var int my; <<< `${my} Hello, interpolation!` >>>; diff --git a/tests/interp/to_string.gw b/tests/interp/to_string.gw index 1f137ada..16e6ce21 100644 --- a/tests/interp/to_string.gw +++ b/tests/interp/to_string.gw @@ -1,4 +1,4 @@ #! [contains] Hello, interpolation! 1 -1 => int my; -`Hello, interpolation! ${ my }` => string s; +1 => var int my; +`Hello, interpolation! ${ my }` => var string s; <<< s >>>; diff --git a/tests/match/match_where.gw b/tests/match/match_where.gw index 19803bb8..1f5d56aa 100644 --- a/tests/match/match_where.gw +++ b/tests/match/match_where.gw @@ -1,4 +1,4 @@ -int i; +var int i; match (i) { case _ : <<< "success" >>>; -} where int a; +} where var int a; diff --git a/tests/new/class_fptr_returns_fptr.gw b/tests/new/class_fptr_returns_fptr.gw index 19646d19..b35adce1 100644 --- a/tests/new/class_fptr_returns_fptr.gw +++ b/tests/new/class_fptr_returns_fptr.gw @@ -1,24 +1,13 @@ class C { -int m_i; + var int m_i; typedef void t_fptr0(); typedef void t_fptr1(int i); fun void test() { <<< this , " ", __func__ >>>;} fun void test(int i) { <<< __func__, " ", i >>>;} -#! fun t_fptr call() { -#! <<< this >>>; -#! return test $ t_fptr; -#! } -#! spork call(); -#! me.yield(); -#!<<< this >>>; -#! test @=> -test @=> t_fptr0 ptr0; -test @=> t_fptr1 ptr1; -<<>>; + test @=> var t_fptr0 ptr0; + test @=> var t_fptr1 ptr1; + <<>>; spork ptr0(); -#! spork ptr1(2); me.yield(); } -<<< C c >>>; -#!<<< c.test >>>; -#!<<< c.call() >>>; +<<< var C c >>>; diff --git a/tests/new/dottmpl.gw b/tests/new/dottmpl.gw index 0576efe1..bd23ed18 100644 --- a/tests/new/dottmpl.gw +++ b/tests/new/dottmpl.gw @@ -2,9 +2,8 @@ class C { fun void test<~A~>(A a) { <<< a >>>; } } -class D extends C { -} +class D extends C {} -D d; +var D d; d.test(1); d.test(2.3); diff --git a/tests/new/dtor.gw b/tests/new/dtor.gw index 94de83a1..1d82ee41 100644 --- a/tests/new/dtor.gw +++ b/tests/new/dtor.gw @@ -8,4 +8,4 @@ class E extends <~int~>D { operator @dtor void () { <<< __func__ >>>; } } -E e; +var E e; diff --git a/tests/new/extend_template_union.gw b/tests/new/extend_template_union.gw index e744bd1e..31708f3d 100644 --- a/tests/new/extend_template_union.gw +++ b/tests/new/extend_template_union.gw @@ -10,7 +10,7 @@ class <~A~>C extends <~A~>U { operator @dtor void () { <<< __func__ >>>; } } -<~float~>C c; +var <~float~>C c; <<< c >>>; <<< c.test() >>>; <<< c.i >>>; @@ -19,8 +19,9 @@ class <~A,B~>D extends <~float~>C { } -<~int,int~>D d; +var <~int,int~>D d; class <~A,B~>E extends <~float,B~>D { } -<~int,int~>E e; + +var <~int,int~>E e; diff --git a/tests/new/float.gw b/tests/new/float.gw index a872e0d5..bf06c9b5 100644 --- a/tests/new/float.gw +++ b/tests/new/float.gw @@ -1,5 +1,5 @@ class C { - 1 => float f; + 1 => var float f; } -C c; +var C c; <<< c.f >>>; diff --git a/tests/new/from_owner1.gw b/tests/new/from_owner1.gw index fc45b6c7..7624d93c 100644 --- a/tests/new/from_owner1.gw +++ b/tests/new/from_owner1.gw @@ -1,5 +1,5 @@ class C { - int i; + var int i; class D { i; } diff --git a/tests/new/from_owner2.gw b/tests/new/from_owner2.gw index e1dc893d..35653261 100644 --- a/tests/new/from_owner2.gw +++ b/tests/new/from_owner2.gw @@ -1,5 +1,5 @@ class C { - int i; + var int i; class D { this.i; } diff --git a/tests/new/global_func0.gw b/tests/new/global_func0.gw index a7037abe..e2493ac1 100644 --- a/tests/new/global_func0.gw +++ b/tests/new/global_func0.gw @@ -1,9 +1,9 @@ -123 => global int global_func_i; +123 => global var int global_func_i; class global GlobalFuncClass { - 13 => int i; + 13 => var int i; } <<< global_func_i >>>; -global GlobalFuncClass g_c; +global var GlobalFuncClass g_c; <<< 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" >>>; } diff --git a/tests/new/global_func1.gw b/tests/new/global_func1.gw index 80801795..5f67d835 100644 --- a/tests/new/global_func1.gw +++ b/tests/new/global_func1.gw @@ -3,6 +3,3 @@ <<< g_c.i >>>; <<< g_test >>>; g_test(); - -#!g_test(); -#!g_test(); diff --git a/tests/new/global_var.gw b/tests/new/global_var.gw index 85bdfc9c..54017c37 100644 --- a/tests/new/global_var.gw +++ b/tests/new/global_var.gw @@ -1 +1 @@ -<<< global int global_var_i >>>; +<<< global var int global_var_i >>>; diff --git a/tests/new/implicit_fptr.gw b/tests/new/implicit_fptr.gw index 01c93148..06261641 100644 --- a/tests/new/implicit_fptr.gw +++ b/tests/new/implicit_fptr.gw @@ -5,4 +5,5 @@ class C { test => f; f(test); } -C c; + +var C c; diff --git a/tests/new/int_float_minus.gw b/tests/new/int_float_minus.gw index 9d1e9fad..3d3b2aca 100644 --- a/tests/new/int_float_minus.gw +++ b/tests/new/int_float_minus.gw @@ -7,7 +7,7 @@ fun float test(float f) { <<< 1.9 > 1 >>>; -int i; +var int i; <<< .1 -=> i >>>; diff --git a/tests/new/invalid_decl_exp.gw b/tests/new/invalid_decl_exp.gw index 2eb33ffc..40dc93ac 100644 --- a/tests/new/invalid_decl_exp.gw +++ b/tests/new/invalid_decl_exp.gw @@ -1,2 +1,2 @@ -typeof(1) i; +var typeof(1) i; <<< i >>>; diff --git a/tests/new/lambda.gw b/tests/new/lambda.gw index 4e1a697c..62f4a035 100644 --- a/tests/new/lambda.gw +++ b/tests/new/lambda.gw @@ -1,32 +1,9 @@ class C { typedef void ptr_t(int i,int j); - \a b { <<< this, " ", a, " ", b, " test" >>>; } @=> ptr_t ptr; -#! typeof(a,b) { <<< "test" >>>; } @=> -#! ptr_t ptr; -#! ptr(1,2); + \a b { <<< this, " ", a, " ", b, " test" >>>; } @=> var ptr_t ptr; fun void test(int i, int j) { <<< this, " ", i, " ", j >>>; } -#! fun void test(ptr_t t, int i) { -#!<<< t >>>; -#! t(2,i); -#! } -#! test(typeof(a,b) { <<< this, " lambda argument" >>>; }, 2); } -#!<<< C c >>>; -C c; +var C c; <<< c >>>; -#!<<< c.test >>>; -#!<<< c.ptr >>>; -#!c.ptr(1,2); -#!<<< c.test >>>; c.test @=> c.ptr; -#!c.ptr; -#!<<< c.ptr >>>; -#!c.test(1,2); c.ptr(1, 2); -#!c.ptr(1, 2); -#!c.ptr(1, 2); -#!(1,2) => c.ptr; -#!c.test(typeof(a,b) { <<< this, "lambda argument" >>>; }, 2); -#!c.test(c.ptr, 2); -#!<<< c.ptr >>>; -#!c.ptr; diff --git a/tests/new/lambda2.gw b/tests/new/lambda2.gw index 5597c94e..0953a1af 100644 --- a/tests/new/lambda2.gw +++ b/tests/new/lambda2.gw @@ -1,20 +1,15 @@ class C { -typedef void ptr_t(int i); -\a { <<< this, " ", a >>>; } @=> ptr_t ptr; -#!ptr(3); -fun void t1(int i) { <<< this, " t1 ", i >>>; } -fun void test(ptr_t p) { -<<< this >>>; - p(1); + typedef 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) { + <<< this >>>; + p(1); + } + t1 @=> var ptr_t t1p; + test(t1p); } -t1 @=> ptr_t t1p; -#!test(t1$ptr_t); -test(t1p); -#!test(ptr); -#!<<< t1 >>>; -#!<<< t1$ptr_t >>>; -} -<<< C c >>>; +<<< var C c >>>; <<< c.test(c.ptr) >>>; <<< c.ptr(1) >>>; c.test(c.t1p); diff --git a/tests/new/lambda3.gw b/tests/new/lambda3.gw index fb39c19e..d3460d56 100644 --- a/tests/new/lambda3.gw +++ b/tests/new/lambda3.gw @@ -1,2 +1,2 @@ -12 => int i; +12 => var int i; \a b { <<< "i: ", i, " ", a, " ", b >>>; }(1,2); diff --git a/tests/new/noxid.gw b/tests/new/noxid.gw index 7331f8a7..13c39d40 100644 --- a/tests/new/noxid.gw +++ b/tests/new/noxid.gw @@ -1 +1 @@ -typeof(1) i; +var typeof(1) i; diff --git a/tests/new/parent.gw b/tests/new/parent.gw index f330a5cb..99e84d68 100644 --- a/tests/new/parent.gw +++ b/tests/new/parent.gw @@ -6,9 +6,9 @@ class <~A~> C extends B { } class <~A,B~> D extends <~A~>C { class <~A~>Child { - A a; + var A a; } - <~A~>Child child; + var <~A~>Child child; } -<~int~>D d; +var <~int~>D d; diff --git a/tests/new/pure_member.gw b/tests/new/pure_member.gw index b1470b9a..d0c73455 100644 --- a/tests/new/pure_member.gw +++ b/tests/new/pure_member.gw @@ -1,9 +1,12 @@ class C { -fun A pure<~A~>(A i) { return i; } -<<< 2 => pure >>>; -<<< 2 => pure >>>; -<<< 3 => pure >>>; -<<< 4 => pure >>>; -<<< 2.2 => pure >>>; + fun A pure<~A~>(A i) { + return i; + } + <<< 2 => pure >>>; + <<< 2 => pure >>>; + <<< 3 => pure >>>; + <<< 4 => pure >>>; + <<< 2.2 => pure >>>; } -C c; + +var C c; diff --git a/tests/new/recursive_template.gw b/tests/new/recursive_template.gw index 1b8b4074..31d2c74e 100644 --- a/tests/new/recursive_template.gw +++ b/tests/new/recursive_template.gw @@ -1,5 +1,5 @@ fun void test<~A~>(int i, A a) { - A b; + var A b; <<< __func__, " ", a >>>; <<< i, " ", a >>>; if(i) diff --git a/tests/new/recursive_template0.gw b/tests/new/recursive_template0.gw index 89ba5643..b8ae7469 100644 --- a/tests/new/recursive_template0.gw +++ b/tests/new/recursive_template0.gw @@ -1,9 +1,8 @@ fun void test<~A~>(int i) { - A a; + var A a; <<< a >>>; <<< __func__, " ", i, " ", a >>>; if(i) -#!me.exit(); - test<~float~>((i-2)); + test<~float~>((i-2)); } test<~float~>(2); diff --git a/tests/new/recursive_template1.gw b/tests/new/recursive_template1.gw index ddfbf064..a671390d 100644 --- a/tests/new/recursive_template1.gw +++ b/tests/new/recursive_template1.gw @@ -1,9 +1,7 @@ fun void test<~A~>(int i) { - A a; + var A a; <<< a >>>; -#! <<< __func__, " ", i, " ", a >>>; if(i) -#!me.exit(); test<~float~>((i-2)); } test<~Object~>(2); diff --git a/tests/new/recursive_template2.gw b/tests/new/recursive_template2.gw index 4755a580..f28daaf9 100644 --- a/tests/new/recursive_template2.gw +++ b/tests/new/recursive_template2.gw @@ -1,9 +1,8 @@ fun void test<~A~>(A i) { - A a; + var A a; <<< a , " ", __func__>>>; <<< i, " ", a >>>; if(i > 0) -#!me.exit(); test(i-2.0); } test<~int~>(2); diff --git a/tests/new/recursive_template3.gw b/tests/new/recursive_template3.gw index 4d753ba5..3b2e2b4a 100644 --- a/tests/new/recursive_template3.gw +++ b/tests/new/recursive_template3.gw @@ -1,14 +1,10 @@ fun void test<~A~>(A i) { - A a; + var A a; <<< a >>>; <<< i, " ", a, " ", i > 1 >>>; if(i > 1) { -#! 2 -=> i; -#! i => A a; -#! test(a); .1 -=> i; test(i); -#! test(i); } } test(2.0); diff --git a/tests/new/recursive_template_test.gw b/tests/new/recursive_template_test.gw index 5416ba74..3ba98942 100644 --- a/tests/new/recursive_template_test.gw +++ b/tests/new/recursive_template_test.gw @@ -1,6 +1,6 @@ fun void test<~A~>(int i) { <<< __func__ >>>; - <<< 1 >>>; } + test<~int~>(1); diff --git a/tests/new/ref.gw b/tests/new/ref.gw index 8923bf10..ea7ac129 100644 --- a/tests/new/ref.gw +++ b/tests/new/ref.gw @@ -1 +1 @@ -new Object @=> Object nonnull o; +new Object @=> nonnull Object o; diff --git a/tests/new/spork.gw b/tests/new/spork.gw index da3462e6..f828ab74 100644 --- a/tests/new/spork.gw +++ b/tests/new/spork.gw @@ -1,6 +1,5 @@ fun void _t() { <<< __func__ >>>; } fun int t() { -#!<<< 1 >>>; spork _t(); spork \a{ <<< __func__, " ", a >>>; }(1); diff --git a/tests/new/spork2.gw b/tests/new/spork2.gw index 8acf418f..3243458a 100644 --- a/tests/new/spork2.gw +++ b/tests/new/spork2.gw @@ -1,16 +1,16 @@ fun void _t() { <<< __func__ >>>; } class C { -<<< this >>>; -fun void __t() { <<< __func__ >>>; } -fun void __t(int i) { <<< this, " ", __func__, " ", i >>>; } -fun void t() { + <<< this >>>; + fun void __t() { <<< __func__ >>>; } + fun void __t(int i) { <<< this, " ", __func__, " ", i >>>; } + fun void t() { spork _t(); spork _t(); spork this.__t(); spork __t(); -<<< this >>>; + <<< this >>>; spork __t(2); -me.yield(); + me.yield(); spork \{ <<< " " , __func__ >>>; }(); spork \a{ <<< __func__, " ", a >>>; }(1); @@ -23,5 +23,5 @@ t(); t(); me.yield(); } -<<< C c >>>; +<<< var C c >>>; me.yield(); diff --git a/tests/new/spork_fptr.gw b/tests/new/spork_fptr.gw index e1bef54b..aa7d105d 100644 --- a/tests/new/spork_fptr.gw +++ b/tests/new/spork_fptr.gw @@ -1,15 +1,15 @@ class C { -typedef void t_fptr(int i); -fun void test(int i) { <<< this , " ", __func__, " ", i >>>;} -test @=> t_fptr ptr; + typedef void t_fptr(int i); + fun void test(int i) { <<< this , " ", __func__, " ", i >>>;} + test @=> var t_fptr ptr; } typedef void t_fptr(int i); fun void test(int i) { <<< __func__, " ", i >>>;} -test @=> t_fptr ptr; +test @=> var t_fptr ptr; <<< ptr >>>; spork ptr(2); me.yield(); -<<>>; +<<>>; <<< c.ptr >>>; spork c.ptr(3); me.yield(); diff --git a/tests/new/spork_fptr2.gw b/tests/new/spork_fptr2.gw index a286dbfb..1081cd20 100644 --- a/tests/new/spork_fptr2.gw +++ b/tests/new/spork_fptr2.gw @@ -2,11 +2,9 @@ class C { typedef void t_fptr(int i, int); fun void test(int i, int j) { <<< this , " ", __func__, " ", i, " " , j >>>;} - test @=> t_fptr ptr; -<<< this, ptr >>>; -#! ptr(2); + test @=> var t_fptr ptr; + <<< this, ptr >>>; spork ptr(1,2); -#! me.yield(); second => now; } -<<>>; +<<>>; diff --git a/tests/new/spork_in_func.gw b/tests/new/spork_in_func.gw index 88b852ec..70e45634 100644 --- a/tests/new/spork_in_func.gw +++ b/tests/new/spork_in_func.gw @@ -1,8 +1,6 @@ fun void test() { -#! <<< 1 >>>; -#!spork \{<<< 2 >>>;}(); } -test(); -test(); +test(); +test(); <<< "end" >>>; me.yield(); diff --git a/tests/new/stackov.gw b/tests/new/stackov.gw index 1fffc758..e152cb21 100644 --- a/tests/new/stackov.gw +++ b/tests/new/stackov.gw @@ -1,5 +1,5 @@ fun void test(int i) { - <<< "test ", i >>>; + <<< "test ", i >>>; if(i > 1) test(i-1); } @@ -10,7 +10,5 @@ fun void launch(int i) { } spork launch(2); -#!second => now; me.yield(); -#!.1::samp => now; launch(12); diff --git a/tests/new/stackov2.gw b/tests/new/stackov2.gw index 06767a7d..79985580 100644 --- a/tests/new/stackov2.gw +++ b/tests/new/stackov2.gw @@ -1,5 +1,4 @@ fun void launch(int i) { <<< " launch ", i >>>; } -#!spork launch(2); me.yield(); diff --git a/tests/new/static.gw b/tests/new/static.gw index 3503c334..1d76aed0 100644 --- a/tests/new/static.gw +++ b/tests/new/static.gw @@ -1,4 +1,9 @@ -class C { fun static C t() { C c; <<< c, " something" >>>; -return c; } } -#!C c; +class C { + fun static C t() { + var C c; + <<< c, " something" >>>; + return c; + } +} + <<< C.t() >>>; diff --git a/tests/new/static_tmpl2.gw b/tests/new/static_tmpl2.gw index 3d2d2f61..dc620da0 100644 --- a/tests/new/static_tmpl2.gw +++ b/tests/new/static_tmpl2.gw @@ -1,11 +1,6 @@ -#!C.t<~float~>(); -#!C.t<~Object~>(); class D extends C { } -#!<<< "here" >>>; -D d; +var D d; <<< d >>>; -#!<<< d.t() >>>; <<< d.t<~int~>() >>>; -#!d.t<~Object~>(); diff --git a/tests/new/template_class_in_template.gw b/tests/new/template_class_in_template.gw index 0b2cade1..bf9d88ec 100644 --- a/tests/new/template_class_in_template.gw +++ b/tests/new/template_class_in_template.gw @@ -1,8 +1,8 @@ class <~A~>Parent { class <~B~>C { - 12 => A a; - 13 => B B; + 12 => var A a; + 13 => var B B; } } -<~int, int~>Parent->C c; +var <~int, int~>Parent.C c; <<< c.a >>>; diff --git a/tests/new/template_dyn.gw b/tests/new/template_dyn.gw index 64d5749b..3734c12e 100644 --- a/tests/new/template_dyn.gw +++ b/tests/new/template_dyn.gw @@ -11,6 +11,6 @@ class E extends D { } -<<< E e >>>; +<<< var E e >>>; e.test(123,3); diff --git a/tests/new/test.gw b/tests/new/test.gw index e2f0cce5..f28cf295 100644 --- a/tests/new/test.gw +++ b/tests/new/test.gw @@ -1,8 +1,8 @@ class C { typedef static void func_t<~A~>(A a); fun static void myfunc<~A~>(A a) { <<< a >>>; } - myfunc @=> static func_t ptr; + myfunc @=> static var func_t ptr; ptr(1); } -C c; +var C c; diff --git a/tests/new/test2.gw b/tests/new/test2.gw index da99f314..c9814482 100644 --- a/tests/new/test2.gw +++ b/tests/new/test2.gw @@ -1,8 +1,8 @@ class <~A~>C { typedef static void func_t<~A~>(A a); fun static void myfunc<~A~>(A a) { <<< a >>>; } - myfunc @=> static func_t ptr; + myfunc @=> static var func_t ptr; ptr(1); } -<~int~>C c; +var <~int~>C c; diff --git a/tests/new/typedef_func_class.gw b/tests/new/typedef_func_class.gw index d52f2885..949383e6 100644 --- a/tests/new/typedef_func_class.gw +++ b/tests/new/typedef_func_class.gw @@ -1,7 +1,7 @@ class C { typedef void t_ptr(); - t_ptr iptr; + var t_ptr iptr; fun void test() { <<< this, " ", __func__ >>>; @@ -11,7 +11,8 @@ class C { <<< iptr() >>>; <<< iptr() >>>; } -<<>>; - <<< c.iptr >>>; - <<< c.iptr() >>>; - <<< c.iptr() >>>; + +<<>>; +<<< c.iptr >>>; +<<< c.iptr() >>>; +<<< c.iptr() >>>; diff --git a/tests/new/typedef_func_class_variadic.gw b/tests/new/typedef_func_class_variadic.gw index e8400730..f4e2a3bc 100644 --- a/tests/new/typedef_func_class_variadic.gw +++ b/tests/new/typedef_func_class_variadic.gw @@ -1,7 +1,7 @@ class C { typedef void t_ptr(...); - t_ptr iptr; + var t_ptr iptr; fun void test(...) { <<< this, " ", __func__ >>>; @@ -14,7 +14,8 @@ class C { <<< iptr() >>>; <<< iptr() >>>; } -<<>>; - <<< c.iptr >>>; - <<< c.iptr(1) >>>; - <<< c.iptr(1,2) >>>; + +<<>>; +<<< c.iptr >>>; +<<< c.iptr(1) >>>; +<<< c.iptr(1,2) >>>; diff --git a/tests/new/typedef_func_tmpl_class.gw b/tests/new/typedef_func_tmpl_class.gw index bdb92444..77bbd95c 100644 --- a/tests/new/typedef_func_tmpl_class.gw +++ b/tests/new/typedef_func_tmpl_class.gw @@ -1,7 +1,7 @@ class C { typedef void t_ptr<~A~>(); - <~int~>t_ptr iptr; + var <~int~>t_ptr iptr; fun void test<~A~>() { <<< this, " ", __func__ >>>; @@ -11,7 +11,8 @@ class C { <<< iptr() >>>; <<< iptr() >>>; } -<<>>; - <<< c.iptr >>>; - <<< c.iptr() >>>; - <<< c.iptr() >>>; + +<<>>; +<<< c.iptr >>>; +<<< c.iptr() >>>; +<<< c.iptr() >>>; diff --git a/tests/new/typedef_func_tmpl_class_static.gw b/tests/new/typedef_func_tmpl_class_static.gw index df6015c8..1da8290f 100644 --- a/tests/new/typedef_func_tmpl_class_static.gw +++ b/tests/new/typedef_func_tmpl_class_static.gw @@ -1,18 +1,15 @@ class C { typedef static void t_ptr<~A~>(); - <~int~>t_ptr iptr; + var <~int~>t_ptr iptr; fun static void test<~A~>() { <<< __func__ >>>; } test @=> iptr; -#! test<~int~>(); <<< iptr() >>>; - <<< iptr() >>>; + <<< iptr() >>>; } -<<>>; -#! <<< c.iptr >>>; -#! <<< c.iptr() >>>; -#! <<< c.iptr() >>>; + +<<>>; diff --git a/tests/new/typedef_func_tmpl_err.gw b/tests/new/typedef_func_tmpl_err.gw index 5088d90e..9a9e0b9f 100644 --- a/tests/new/typedef_func_tmpl_err.gw +++ b/tests/new/typedef_func_tmpl_err.gw @@ -1,6 +1,6 @@ typedef void t_ptr<~A~>(); -t_ptr ptr; +var t_ptr ptr; fun void test<~A~>() { <<< __func_ >>>; @@ -8,9 +8,3 @@ fun void test<~A~>() { test @=> ptr; ptr<~int~>(); - - -#!typedef <~int~>t_ptr B; -#!B B; -#!<<>>; -#!<<< B<~int~>() >>>; diff --git a/tests/new/typedef_func_tmpl_tmpl.gw b/tests/new/typedef_func_tmpl_tmpl.gw index 04a943b8..d324c0f9 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); -<~ <~A~> Ptr~>ptr_t t; +var <~ <~A~> Ptr~>ptr_t t; diff --git a/tests/new/typedefing_array.gw b/tests/new/typedefing_array.gw index 18eccd7e..30b815b3 100644 --- a/tests/new/typedefing_array.gw +++ b/tests/new/typedefing_array.gw @@ -1,6 +1,6 @@ typedef int[1] Array; typedef Array[1] MyArray; -MyArray a; +var MyArray a; <<< a >>>; <<< a[0] >>>; <<< a[0][0] >>>; diff --git a/tests/new/typeof3.gw b/tests/new/typeof3.gw index 9039e933..c6ab91bd 100644 --- a/tests/new/typeof3.gw +++ b/tests/new/typeof3.gw @@ -1,7 +1,7 @@ class C {} class D extends C {} -C c; -D d; +var C c; +var D d; <<< typeof(c) < typeof(d) >>>; <<< typeof(c) > typeof(d) >>>; <<< C < D >>>; diff --git a/tests/new/vararg_cpy.gw b/tests/new/vararg_cpy.gw index baedc594..6a2dc204 100644 --- a/tests/new/vararg_cpy.gw +++ b/tests/new/vararg_cpy.gw @@ -1,5 +1,5 @@ fun void test(...) { <<< vararg >>>; - <<< vararg.cpy() @=> Vararg ref new_arg >>>; + <<< vararg.cpy() @=> ref Vararg new_arg >>>; } test(1); diff --git a/tests/nonnull/cast_non_null.gw b/tests/nonnull/cast_non_null.gw index 38b28e49..0087c856 100644 --- a/tests/nonnull/cast_non_null.gw +++ b/tests/nonnull/cast_non_null.gw @@ -1,2 +1,2 @@ -Object ref o; -o $ Event nonnull; +ref Object o; +o $ nonnull Event; diff --git a/tests/nonnull/cast_non_null2.gw b/tests/nonnull/cast_non_null2.gw index d77a95df..4dbedf5c 100644 --- a/tests/nonnull/cast_non_null2.gw +++ b/tests/nonnull/cast_non_null2.gw @@ -1,2 +1,2 @@ -Object ref o; +ref Object o; o $ Object; diff --git a/tests/nonnull/dynamic_implicit_nonnull.gw b/tests/nonnull/dynamic_implicit_nonnull.gw index d18089a3..0ebff9bf 100644 --- a/tests/nonnull/dynamic_implicit_nonnull.gw +++ b/tests/nonnull/dynamic_implicit_nonnull.gw @@ -1,3 +1,3 @@ -fun void test(Object nonnull o) { <<< o >>>; } +fun void test(nonnull Object o) { <<< o >>>; } -Object ref o => test; +ref Object o => test; diff --git a/tests/nonnull/nonnull2nullable.gw b/tests/nonnull/nonnull2nullable.gw index 2d4bfde1..f9c6956e 100644 --- a/tests/nonnull/nonnull2nullable.gw +++ b/tests/nonnull/nonnull2nullable.gw @@ -1 +1 @@ -Object nonnull o @=> Object ref p; +nonnull Object o @=> ref Object p; diff --git a/tests/nonnull/nonnull_assign_nonnull.gw b/tests/nonnull/nonnull_assign_nonnull.gw index 82af6dca..f61c76c6 100644 --- a/tests/nonnull/nonnull_assign_nonnull.gw +++ b/tests/nonnull/nonnull_assign_nonnull.gw @@ -1,2 +1,2 @@ -Object nonnull o, p; +nonnull Object o, p; o @=> p; diff --git a/tests/nonnull/nonnull_at_nonnull.gw b/tests/nonnull/nonnull_at_nonnull.gw index fc515563..9bfe9ba3 100644 --- a/tests/nonnull/nonnull_at_nonnull.gw +++ b/tests/nonnull/nonnull_at_nonnull.gw @@ -1 +1 @@ -new Object nonnull @=> Object nonnull o; +new nonnull Object @=> nonnull Object o; diff --git a/tests/nonnull/nonnull_cast_nonnull.gw b/tests/nonnull/nonnull_cast_nonnull.gw index 307e6976..cd1e47d3 100644 --- a/tests/nonnull/nonnull_cast_nonnull.gw +++ b/tests/nonnull/nonnull_cast_nonnull.gw @@ -1 +1 @@ -(Object nonnull o) $ Object nonnull; +(nonnull Object o) $ nonnull Object; diff --git a/tests/nonnull/nonnull_decl.gw b/tests/nonnull/nonnull_decl.gw index 437d9607..59f539ea 100644 --- a/tests/nonnull/nonnull_decl.gw +++ b/tests/nonnull/nonnull_decl.gw @@ -1 +1 @@ -Object nonnull o; +nonnull Object o; diff --git a/tests/nonnull/nonnull_decl_ref_assign.gw b/tests/nonnull/nonnull_decl_ref_assign.gw index b055145b..89a9aaf2 100644 --- a/tests/nonnull/nonnull_decl_ref_assign.gw +++ b/tests/nonnull/nonnull_decl_ref_assign.gw @@ -1 +1 @@ -new Object @=> Object nonnull ref o; +new Object @=> nonnull ref Object o; diff --git a/tests/nonnull/nonnull_err_cast_dynamic.gw b/tests/nonnull/nonnull_err_cast_dynamic.gw index 5653b123..58524f58 100644 --- a/tests/nonnull/nonnull_err_cast_dynamic.gw +++ b/tests/nonnull/nonnull_err_cast_dynamic.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -Object ref o; -<<< o $ Object nonnull >>>; +ref Object o; +<<< o $ nonnull Object >>>; diff --git a/tests/nonnull/nonnull_err_dynamic.gw b/tests/nonnull/nonnull_err_dynamic.gw index 6b1427d3..31fc112f 100644 --- a/tests/nonnull/nonnull_err_dynamic.gw +++ b/tests/nonnull/nonnull_err_dynamic.gw @@ -1,5 +1,5 @@ #! [contains} NullPtrException -fun void test(Object nonnull o) { +fun void test(nonnull Object o) { <<< o >>>; } -Object ref ref => test; +ref Object o => test; diff --git a/tests/nonnull/nonnull_err_static_cast.gw b/tests/nonnull/nonnull_err_static_cast.gw index bbebc528..95cd395c 100644 --- a/tests/nonnull/nonnull_err_static_cast.gw +++ b/tests/nonnull/nonnull_err_static_cast.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -Object ref ref_object; -<<< ref_object $ Object nonnull >>>; +ref Object ref_object; +<<< ref_object $ nonnull Object >>>; diff --git a/tests/nonnull/nonnull_impl_nonnull.gw b/tests/nonnull/nonnull_impl_nonnull.gw index 99b23480..f8e288ad 100644 --- a/tests/nonnull/nonnull_impl_nonnull.gw +++ b/tests/nonnull/nonnull_impl_nonnull.gw @@ -1,2 +1,2 @@ -fun void test(Object nonnull o) { <<< o >>>; } -Object nonnull o => test; +fun void test(nonnull Object o) { <<< o >>>; } +nonnull Object o => test; diff --git a/tests/nonnull/nonnull_implicit_nonnull.gw b/tests/nonnull/nonnull_implicit_nonnull.gw index 99b23480..f8e288ad 100644 --- a/tests/nonnull/nonnull_implicit_nonnull.gw +++ b/tests/nonnull/nonnull_implicit_nonnull.gw @@ -1,2 +1,2 @@ -fun void test(Object nonnull o) { <<< o >>>; } -Object nonnull o => test; +fun void test(nonnull Object o) { <<< o >>>; } +nonnull Object o => test; diff --git a/tests/nonnull/normal_at_nonnull.gw b/tests/nonnull/normal_at_nonnull.gw index 8923bf10..ea7ac129 100644 --- a/tests/nonnull/normal_at_nonnull.gw +++ b/tests/nonnull/normal_at_nonnull.gw @@ -1 +1 @@ -new Object @=> Object nonnull o; +new Object @=> nonnull Object o; diff --git a/tests/nonnull/normal_cast_nonnull.gw b/tests/nonnull/normal_cast_nonnull.gw index f8f4beb6..c630d989 100644 --- a/tests/nonnull/normal_cast_nonnull.gw +++ b/tests/nonnull/normal_cast_nonnull.gw @@ -1 +1 @@ -new Object $ Object nonnull; +new Object $ nonnull Object; diff --git a/tests/nonnull/normal_impl_nonnull.gw b/tests/nonnull/normal_impl_nonnull.gw index cbdeae77..6d30b14e 100644 --- a/tests/nonnull/normal_impl_nonnull.gw +++ b/tests/nonnull/normal_impl_nonnull.gw @@ -1,2 +1,2 @@ -fun void test(Object nonnull o) { <<< o >>>; } +fun void test(nonnull Object o) { <<< o >>>; } new Object => test; diff --git a/tests/nonnull/null_at_nonnull.gw b/tests/nonnull/null_at_nonnull.gw index 40b4ae2b..adc5ded2 100644 --- a/tests/nonnull/null_at_nonnull.gw +++ b/tests/nonnull/null_at_nonnull.gw @@ -1,2 +1,2 @@ #! [contains] can't assign -null @=> Object nonnull o; +null @=> nonnull Object o; diff --git a/tests/nonnull/null_cast_nonnull.gw b/tests/nonnull/null_cast_nonnull.gw index 4ed42ffb..d2e50569 100644 --- a/tests/nonnull/null_cast_nonnull.gw +++ b/tests/nonnull/null_cast_nonnull.gw @@ -1,2 +1,2 @@ #! [contains] can't cast -null $ Object nonnull; +null $ nonnull Object; diff --git a/tests/nonnull/null_impl_nonnull.gw b/tests/nonnull/null_impl_nonnull.gw index 55b7dd03..3c2fbca3 100644 --- a/tests/nonnull/null_impl_nonnull.gw +++ b/tests/nonnull/null_impl_nonnull.gw @@ -1,3 +1,3 @@ #! [contains] can't implicitly cast -fun void test(Object nonnull o) { <<< o >>>; } +fun void test(nonnull Object o) { <<< o >>>; } null => test; diff --git a/tests/nonnull/ref.gw b/tests/nonnull/ref.gw index 8923bf10..ea7ac129 100644 --- a/tests/nonnull/ref.gw +++ b/tests/nonnull/ref.gw @@ -1 +1 @@ -new Object @=> Object nonnull o; +new Object @=> nonnull Object o; diff --git a/tests/nonnull/ref_at_nonnull.gw b/tests/nonnull/ref_at_nonnull.gw index 100d3fba..db626b45 100644 --- a/tests/nonnull/ref_at_nonnull.gw +++ b/tests/nonnull/ref_at_nonnull.gw @@ -1,2 +1,2 @@ #! [contains] NullPtrException -Object ref o @=> Object nonnull p; +ref Object o @=> nonnull Object p; diff --git a/tests/nonnull/ref_cast_nonnull.gw b/tests/nonnull/ref_cast_nonnull.gw index 9e19dd9f..6f63edb7 100644 --- a/tests/nonnull/ref_cast_nonnull.gw +++ b/tests/nonnull/ref_cast_nonnull.gw @@ -1,2 +1,2 @@ #! [contains] NullPtrException -(Object ref o) $ Object nonnull; +(ref Object o) $ nonnull Object; diff --git a/tests/nonnull/ref_impl_nonnull.gw b/tests/nonnull/ref_impl_nonnull.gw index 6b53612a..003d9a2e 100644 --- a/tests/nonnull/ref_impl_nonnull.gw +++ b/tests/nonnull/ref_impl_nonnull.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -fun void test(Object nonnull o) { <<< o >>>; } -Object ref o => test; +fun void test(nonnull Object o) { <<< o >>>; } +ref Object o => test; diff --git a/tests/nonnull/ref_nonnull.gw b/tests/nonnull/ref_nonnull.gw index 9266a8d3..1ff7a38b 100644 --- a/tests/nonnull/ref_nonnull.gw +++ b/tests/nonnull/ref_nonnull.gw @@ -1,3 +1,3 @@ #! [contains] NullPtrException -Object ref a @=> Object nonnull o; +ref Object a @=> nonnull Object o; <<< o >>>; diff --git a/tests/nonnull/static_implicit_nonnull.gw b/tests/nonnull/static_implicit_nonnull.gw index 8f0c5dc8..3f657ac4 100644 --- a/tests/nonnull/static_implicit_nonnull.gw +++ b/tests/nonnull/static_implicit_nonnull.gw @@ -1,4 +1,4 @@ #! [contains] can't implicitly cast -fun void test(Object nonnull o) { <<< o >>>; } +fun void test(nonnull Object o) { <<< o >>>; } null => test; diff --git a/tests/nonnull/void_nonnull.gw b/tests/nonnull/void_nonnull.gw index 2ac07158..7952f23c 100644 --- a/tests/nonnull/void_nonnull.gw +++ b/tests/nonnull/void_nonnull.gw @@ -1,2 +1,2 @@ #! [contains] void types can't be nonnull -void nonnull i; +nonnull void i; diff --git a/tests/pp/__func__.gw b/tests/pp/__func__.gw index 6ae55e1a..287a9fed 100644 --- a/tests/pp/__func__.gw +++ b/tests/pp/__func__.gw @@ -10,4 +10,4 @@ class C { } test(); } -C c; +var C c; diff --git a/tests/regression/invalid_template.gw b/tests/regression/invalid_template.gw index 1e27c410..440fc150 100644 --- a/tests/regression/invalid_template.gw +++ b/tests/regression/invalid_template.gw @@ -6,7 +6,7 @@ class<~A,B~>D extends<~A~>C{ class<~A~> E{} class G extends ld {A0I:} - <~A~>d d; + var <~A~>d d; } -<~int~>D d; +var <~int~>D d; diff --git a/tests/slice/slice_array.gw b/tests/slice/slice_array.gw index 5c07a731..bdf15944 100644 --- a/tests/slice/slice_array.gw +++ b/tests/slice/slice_array.gw @@ -1,4 +1,4 @@ -<<< [1,2,3] @=> 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 432f13e6..14ace808 100644 --- a/tests/string/eq.gw +++ b/tests/string/eq.gw @@ -1,5 +1,5 @@ -"test" @=> string s0; -"_test" @=> 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 816f7477..13df22af 100644 --- a/tests/string/erase.gw +++ b/tests/string/erase.gw @@ -1,4 +1,4 @@ -"test test" => string s; +"test test" => var string s; s.erase(-1, 0); s.erase(0, -1); diff --git a/tests/struct/member_func.gw b/tests/struct/member_func.gw index 60ac1a98..5186089b 100644 --- a/tests/struct/member_func.gw +++ b/tests/struct/member_func.gw @@ -1,12 +1,13 @@ class C { 1 => test; fun int test(int i) { - 13 => int j; + 13 => var int j; return j; } } -C c; -12 => c.test => int ret; + +var C c; +12 => c.test => var int ret; <<< 1394 >>>; <<>>; diff --git a/tests/struct/struct_gack.gw b/tests/struct/struct_gack.gw index a5a4edd5..0b0488e4 100644 --- a/tests/struct/struct_gack.gw +++ b/tests/struct/struct_gack.gw @@ -1,7 +1,8 @@ struct S { - 13 => int i; + 13 => var int i; operator @gack void() { <<< "test", i >>>; } <<< this >>>; } -S s; + +var S s; <<< s >>>; diff --git a/tests/struct/struct_global0.gw b/tests/struct/struct_global0.gw index e60d17fb..d9eac97d 100644 --- a/tests/struct/struct_global0.gw +++ b/tests/struct/struct_global0.gw @@ -1,14 +1,14 @@ struct global GlobalStruct { - int i; - float f; - string s; + var int i; + var float f; + var string s; } struct global GlobalStructWithCtor { - int i; - float f; - string s; + var int i; + var float f; + var string s; } -global GlobalStruct global_s; -GlobalStructWithCtor sctor; +global var GlobalStruct global_s; +var GlobalStructWithCtor sctor; diff --git a/tests/struct/struct_global1.gw b/tests/struct/struct_global1.gw index 3199b2d5..abb93aa8 100644 --- a/tests/struct/struct_global1.gw +++ b/tests/struct/struct_global1.gw @@ -1 +1 @@ -GlobalStruct s; +var GlobalStruct s; diff --git a/tests/struct/struct_member.gw b/tests/struct/struct_member.gw index 5de8dc48..e18d19f3 100644 --- a/tests/struct/struct_member.gw +++ b/tests/struct/struct_member.gw @@ -1,13 +1,14 @@ class C { struct S { - string s; - float a; - 11 => int i; - 13 => float f; + var string s; + var float a; + 11 => var int i; + 13 => var float f; } - S s; + var S s; <<< "after ctor" >>>; } -C c; + +var C c; <<< c.s.i >>>; diff --git a/tests/struct/struct_member_func.gw b/tests/struct/struct_member_func.gw index a962263f..9e79b0e3 100644 --- a/tests/struct/struct_member_func.gw +++ b/tests/struct/struct_member_func.gw @@ -1,8 +1,9 @@ struct S { - 4 => int i; - 12 => int j; + 4 => var int i; + 12 => var int j; fun int test() { <<< "test", i >>>; } test(); } -S s; + +var S s; s.test(); diff --git a/tests/struct/struct_noctor.gw b/tests/struct/struct_noctor.gw index c08a62cf..28c08fdf 100644 --- a/tests/struct/struct_noctor.gw +++ b/tests/struct/struct_noctor.gw @@ -1,8 +1,8 @@ struct S { - float f; + var float f; fun void test() { <<< __func__, f >>>; } } -S s; +var S s; 12.3 => s.f; s.test(); diff --git a/tests/struct/struct_return.gw b/tests/struct/struct_return.gw index 25837e34..941e3423 100644 --- a/tests/struct/struct_return.gw +++ b/tests/struct/struct_return.gw @@ -1,10 +1,10 @@ struct S { - int i; - float f; + var int i; + var float f; } fun S test() { - S s; + var S s; 12 => s.i; 12 => s.f; return s; diff --git a/tests/struct/struct_static.gw b/tests/struct/struct_static.gw index 3dec13be..6368b30e 100644 --- a/tests/struct/struct_static.gw +++ b/tests/struct/struct_static.gw @@ -1,10 +1,11 @@ class C { struct S { - 12 => int i; - "testing::" => string s; - 13 => float f; + 12 => var int i; + "testing::" => var string s; + 13 => var float f; <<< __func__ >>>; } - static S s; + static var S s; } -C c; + +var C c; diff --git a/tests/struct/struct_static_func.gw b/tests/struct/struct_static_func.gw index e1ffa260..7f809a3c 100644 --- a/tests/struct/struct_static_func.gw +++ b/tests/struct/struct_static_func.gw @@ -1,9 +1,10 @@ struct S { - int i; - int j; - 12 => static int si; + var int i; + var int j; + 12 => static var int si; fun static void test() { <<< __func__, si >>>; } test(); } -S s; + +var S s; s.test(); diff --git a/tests/struct/struct_template.gw b/tests/struct/struct_template.gw index 49a9fcd8..a983c2a3 100644 --- a/tests/struct/struct_template.gw +++ b/tests/struct/struct_template.gw @@ -1,10 +1,10 @@ struct <~A~> S{ - A a0; - A a1; + var A a0; + var A a1; } -<~int~>S si; -<~float~>S sf; +var <~int~>S si; +var <~float~>S sf; <<< si.a0 >>>; <<< sf.a0 >>>; diff --git a/tests/struct/t.gw b/tests/struct/t.gw index 3e91f487..eb1b849d 100644 --- a/tests/struct/t.gw +++ b/tests/struct/t.gw @@ -1,7 +1,8 @@ struct S { - int i; + var int i; } -S s; + +var S s; <<< s.i >>>; <<< 12 => s.i >>>; <<< s.i >>>; diff --git a/tests/tree/array_empty.gw b/tests/tree/array_empty.gw index 7e86696b..1dfe1ae7 100644 --- a/tests/tree/array_empty.gw +++ b/tests/tree/array_empty.gw @@ -1,2 +1,2 @@ -int i[][][]; +var int i[][][]; <<< i >>>; diff --git a/tests/tree/array_test.gw b/tests/tree/array_test.gw index 01f4d745..e50184b1 100644 --- a/tests/tree/array_test.gw +++ b/tests/tree/array_test.gw @@ -1,9 +1,9 @@ fun void print_array(int a[]){ - for(int i; i < a.size(); i++) + for(var int i; i < a.size(); i++) <<< a[i] >>>; } -int i[5][3]; +var int i[5][3]; 1 => i[2][0]; <<< i.size() >>>; diff --git a/tests/tree/assign_member_ptr.gw b/tests/tree/assign_member_ptr.gw index 2da5caa0..9526f4c6 100644 --- a/tests/tree/assign_member_ptr.gw +++ b/tests/tree/assign_member_ptr.gw @@ -1,8 +1,9 @@ class C { typedef void Test(); - Test test; + var Test test; fun void func(){} } -C c; + +var C c; c.func @=> c.test; diff --git a/tests/tree/ast_doc.gw b/tests/tree/ast_doc.gw index 3832cefa..482528ad 100644 --- a/tests/tree/ast_doc.gw +++ b/tests/tree/ast_doc.gw @@ -1,3 +1,3 @@ -int i; +var int i; <<< i >>>; #!! document the AST diff --git a/tests/tree/auto_array.gw b/tests/tree/auto_array.gw index 0306b9b0..be0bdafc 100644 --- a/tests/tree/auto_array.gw +++ b/tests/tree/auto_array.gw @@ -1,4 +1,4 @@ -int i[2][2]; +var int i[2][2]; foreach(ref a : i) <<< a >>>; <<< i >>>; diff --git a/tests/tree/auto_decl.gw b/tests/tree/auto_decl.gw index f840c7b3..b4c5b51a 100644 --- a/tests/tree/auto_decl.gw +++ b/tests/tree/auto_decl.gw @@ -1,2 +1,2 @@ -<<< new float[3] @=> auto i >>>; -<<< i >>>; \ No newline at end of file +<<< new float[3] @=> var auto i >>>; +<<< i >>>; diff --git a/tests/tree/auto_fun.gw b/tests/tree/auto_fun.gw index 12d1d89b..59332d49 100644 --- a/tests/tree/auto_fun.gw +++ b/tests/tree/auto_fun.gw @@ -2,7 +2,7 @@ class C { } -C i[2]; +var C i[2]; foreach(ref a : i) <<< a >>>; diff --git a/tests/tree/auto_ptr.gw b/tests/tree/auto_ptr.gw index b8fe29ef..244273d2 100644 --- a/tests/tree/auto_ptr.gw +++ b/tests/tree/auto_ptr.gw @@ -1,5 +1,5 @@ -<~int~>Ptr ptr; -int i[4]; +var <~int~>Ptr ptr; +var int i[4]; foreach(ref a : i) <<< *a >>>; <<< ptr >>>; diff --git a/tests/tree/auto_ref.gw b/tests/tree/auto_ref.gw index cd46a74b..b8ad9ae0 100644 --- a/tests/tree/auto_ref.gw +++ b/tests/tree/auto_ref.gw @@ -1 +1 @@ -me @=> auto a; +me @=> var auto a; diff --git a/tests/tree/balance.gw b/tests/tree/balance.gw index 007d2a4b..ecbd5b83 100644 --- a/tests/tree/balance.gw +++ b/tests/tree/balance.gw @@ -22,7 +22,7 @@ class C fun static float s_test(float f) {} } -C c; +var C c; c.test(); () => c.test; diff --git a/tests/tree/binary.gw b/tests/tree/binary.gw index 960ec5aa..600878a4 100644 --- a/tests/tree/binary.gw +++ b/tests/tree/binary.gw @@ -1 +1 @@ -1 => int i; +1 => var int i; diff --git a/tests/tree/branch_eq_float.gw b/tests/tree/branch_eq_float.gw index 6019502d..96365d4b 100644 --- a/tests/tree/branch_eq_float.gw +++ b/tests/tree/branch_eq_float.gw @@ -1,4 +1,4 @@ -float f; +var float f; if(f) <<< "not ok" >>>; else diff --git a/tests/tree/call_nonnull.gw b/tests/tree/call_nonnull.gw index c0122d34..4c020dec 100644 --- a/tests/tree/call_nonnull.gw +++ b/tests/tree/call_nonnull.gw @@ -1,3 +1,3 @@ typedef void test_t<~A~>(); -test_t nonnull t; +nonnull test_t t; t<~int~>(); diff --git a/tests/tree/cast_array.gw b/tests/tree/cast_array.gw index dc3e3598..d77e1cbf 100644 --- a/tests/tree/cast_array.gw +++ b/tests/tree/cast_array.gw @@ -1,6 +1,6 @@ typedef int[2] test; -test var; +var test vv; <<< int >>>; <<< test >>>; -<<< var >>>; -<<< var $ int[] >>>; +<<< v >>>; +<<< v $ int[] >>>; diff --git a/tests/tree/cast_test.gw b/tests/tree/cast_test.gw index c7c0fe73..7c0b31dc 100644 --- a/tests/tree/cast_test.gw +++ b/tests/tree/cast_test.gw @@ -4,11 +4,11 @@ class E extends D {} class F extends E {} class G extends C {} -C c; -D d; -E e; -F f; -G g; +var C c; +var D d; +var E e; +var F f; +var G g; #!<<< f $ D >>>; <<< [ f, g ] >>>; <<< maybe ? f : D >>>; diff --git a/tests/tree/char.gw b/tests/tree/char.gw index f3b14990..df48bdfb 100644 --- a/tests/tree/char.gw +++ b/tests/tree/char.gw @@ -1,3 +1,3 @@ #! [contains] a -'a' => char c; +'a' => var char c; <<< c >>>; diff --git a/tests/tree/check_td_array.gw b/tests/tree/check_td_array.gw index 77607214..11ff539d 100644 --- a/tests/tree/check_td_array.gw +++ b/tests/tree/check_td_array.gw @@ -1,3 +1,3 @@ -int array[][][]; -typeof(array) other_array; +var int array[][][]; +var typeof(array) other_array; <<< other_array >>>; diff --git a/tests/tree/class_binary.gw b/tests/tree/class_binary.gw index 05084962..63512f8f 100644 --- a/tests/tree/class_binary.gw +++ b/tests/tree/class_binary.gw @@ -1,4 +1,4 @@ class C { - 1 => int i; + 1 => var int i; } diff --git a/tests/tree/class_cast.gw b/tests/tree/class_cast.gw index 5620fb81..9cb5a5bb 100644 --- a/tests/tree/class_cast.gw +++ b/tests/tree/class_cast.gw @@ -1,4 +1,5 @@ class C { <<< 1 $ float >>>; } -C c; + +var C c; diff --git a/tests/tree/class_do_until.gw b/tests/tree/class_do_until.gw index d171733c..c3193a3e 100644 --- a/tests/tree/class_do_until.gw +++ b/tests/tree/class_do_until.gw @@ -1,5 +1,5 @@ class C { - int i; + var int i; do { <<< i++ >>>; } while(i < 6); } diff --git a/tests/tree/class_do_while.gw b/tests/tree/class_do_while.gw index d171733c..c3193a3e 100644 --- a/tests/tree/class_do_while.gw +++ b/tests/tree/class_do_while.gw @@ -1,5 +1,5 @@ class C { - int i; + var int i; do { <<< i++ >>>; } while(i < 6); } diff --git a/tests/tree/class_dot.gw b/tests/tree/class_dot.gw index f4437f8c..3258b955 100644 --- a/tests/tree/class_dot.gw +++ b/tests/tree/class_dot.gw @@ -1,9 +1,7 @@ class C { - int i[]; - int j[2]; -#! Machine.shreds() @=> i; -#! null @=> i; + var int i[]; + var int j[2]; } -C c; +var C c; <<< c.j[1] >>>; diff --git a/tests/tree/class_dur.gw b/tests/tree/class_dur.gw index 4bb765fc..705971cd 100644 --- a/tests/tree/class_dur.gw +++ b/tests/tree/class_dur.gw @@ -2,7 +2,7 @@ class C { samp; minute; 5::samp; - float f; + var float f; 2.4 => f; f ::samp => now; } diff --git a/tests/tree/class_for.gw b/tests/tree/class_for.gw index d5a4fdb1..6c4b86d0 100644 --- a/tests/tree/class_for.gw +++ b/tests/tree/class_for.gw @@ -1,5 +1,5 @@ class C { - for(int i; i < 3; i++) + for(var int i; i < 3; i++) <<< i >>>; } diff --git a/tests/tree/class_goto.gw b/tests/tree/class_goto.gw index 19053176..00e35eee 100644 --- a/tests/tree/class_goto.gw +++ b/tests/tree/class_goto.gw @@ -1,7 +1,6 @@ class C { goto here; here: - ; - + ; } diff --git a/tests/tree/class_multi_decl.gw b/tests/tree/class_multi_decl.gw index f7e8feab..c6503ecf 100644 --- a/tests/tree/class_multi_decl.gw +++ b/tests/tree/class_multi_decl.gw @@ -1,4 +1,4 @@ class C { - int i, j; + var int i, j; } diff --git a/tests/tree/class_multi_ref_decl.gw b/tests/tree/class_multi_ref_decl.gw index 440e4ad3..034eefcf 100644 --- a/tests/tree/class_multi_ref_decl.gw +++ b/tests/tree/class_multi_ref_decl.gw @@ -1,4 +1,4 @@ class C { - Object ref i, a; + ref Object i, a; } diff --git a/tests/tree/class_named_union.gw b/tests/tree/class_named_union.gw index b892a523..a72232be 100644 --- a/tests/tree/class_named_union.gw +++ b/tests/tree/class_named_union.gw @@ -1,5 +1,5 @@ class C { - 12 => int _i; + 12 => var int _i; union { int i; float f; @@ -15,7 +15,7 @@ class C { <<< U.i >>>; } -C c; +var C c; <<< c >>>; <<< c.U >>>; diff --git a/tests/tree/class_not_template_inside_template.gw b/tests/tree/class_not_template_inside_template.gw index 7f8774ce..5a86af30 100644 --- a/tests/tree/class_not_template_inside_template.gw +++ b/tests/tree/class_not_template_inside_template.gw @@ -4,4 +4,4 @@ class <~A~>C { } } -<~int~>C->D d; +var <~int~>C.D d; diff --git a/tests/tree/class_repeat.gw b/tests/tree/class_repeat.gw index 1530910d..5fe5aad5 100644 --- a/tests/tree/class_repeat.gw +++ b/tests/tree/class_repeat.gw @@ -1,5 +1,5 @@ class C { - int i; + var int i; repeat(3) { i++; <<< i >>>; diff --git a/tests/tree/class_simple_decl.gw b/tests/tree/class_simple_decl.gw index 9e8e3490..09fc3225 100644 --- a/tests/tree/class_simple_decl.gw +++ b/tests/tree/class_simple_decl.gw @@ -1,4 +1,4 @@ class C { - int i; + var int i; } diff --git a/tests/tree/class_simple_ref_decl.gw b/tests/tree/class_simple_ref_decl.gw index 7610b45b..bf354947 100644 --- a/tests/tree/class_simple_ref_decl.gw +++ b/tests/tree/class_simple_ref_decl.gw @@ -1,4 +1,4 @@ class C { - Object ref o; + ref Object o; } diff --git a/tests/tree/class_template.gw b/tests/tree/class_template.gw index ea552355..c254fd7f 100644 --- a/tests/tree/class_template.gw +++ b/tests/tree/class_template.gw @@ -1,6 +1,6 @@ class<~A,B~> C { - A a; - B b; + var A a; + var B b; fun A test() { <<< "lol" >>>; } @@ -9,11 +9,9 @@ class<~A,B~> C { } } -#!<<< C >>>; -<~int, int~>C c; -<~float, int~>C d; -<~Object, int~>C g; -#!C c; +var <~int, int~>C c; +var <~float, int~>C d; +var <~Object, int~>C g; <<< c.a >>>; <<< d.a >>>; <<< c.test() >>>; diff --git a/tests/tree/class_unary.gw b/tests/tree/class_unary.gw index fc7a5e9d..92ea09d0 100644 --- a/tests/tree/class_unary.gw +++ b/tests/tree/class_unary.gw @@ -1,5 +1,5 @@ class C { - int i; + var int i; i++; } diff --git a/tests/tree/class_until.gw b/tests/tree/class_until.gw index 655d2bbc..f769577f 100644 --- a/tests/tree/class_until.gw +++ b/tests/tree/class_until.gw @@ -1,6 +1,6 @@ class C { - int i; - now + 1.0::samp => time t; + var int i; + 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 a8b5749b..9a5f26aa 100644 --- a/tests/tree/class_while.gw +++ b/tests/tree/class_while.gw @@ -1,6 +1,6 @@ class C { - int i; - now + 3::samp => time t; + var int i; + now + 3::samp => var time t; while(now < t) { i++; samp => now; diff --git a/tests/tree/comment.gw b/tests/tree/comment.gw index f9cbcf1e..00a767e9 100644 --- a/tests/tree/comment.gw +++ b/tests/tree/comment.gw @@ -1 +1 @@ -<<>>; +<<< var int #! this a partial comment !# i>>>; diff --git a/tests/tree/cpy_ast.gw b/tests/tree/cpy_ast.gw index 1266d89d..5dcd811c 100644 --- a/tests/tree/cpy_ast.gw +++ b/tests/tree/cpy_ast.gw @@ -1,8 +1,8 @@ class <~A~>C { \a{}; [ 1 ]; - int i,j; - typeof(i) k; + var int i,j; + var typeof(i) k; 'a'; true $ int; i++; @@ -12,15 +12,15 @@ class <~A~>C { union <~A~>U{ int ui; }; typeof(i); if(i) i; else i; - for(int; i < 1; ++i); - int array[2]; + for(var int _i; _i < 1; ++_i); + var int array[2]; array[0]; foreach(a : array); repeat(1); match i,2 { case 12 when 0:; case _,2 when 0:; - } where int b; + } where var int b; enum { zero }; typedef int Int; goto end; @@ -29,4 +29,5 @@ class <~A~>C { end: while(0){ <<< __func__ >>>; } } -<~int~>C c; + +var <~int~>C c; diff --git a/tests/tree/decl_exp_array.gw b/tests/tree/decl_exp_array.gw index 26db0ea1..3d0ca31a 100644 --- a/tests/tree/decl_exp_array.gw +++ b/tests/tree/decl_exp_array.gw @@ -1,2 +1,2 @@ -<<< typeof( new int[2] ) i >>>; -<<< i >>>; \ No newline at end of file +<<< var typeof( new int[2] ) i >>>; +<<< i >>>; diff --git a/tests/tree/did_you_mean_type.gw b/tests/tree/did_you_mean_type.gw index b55d867d..dbe6e956 100644 --- a/tests/tree/did_you_mean_type.gw +++ b/tests/tree/did_you_mean_type.gw @@ -1,4 +1,4 @@ class C { - int iiii; + var int iiii; <<< this.iii >>>; } diff --git a/tests/tree/dot.gw b/tests/tree/dot.gw index c46e379b..5e26e814 100644 --- a/tests/tree/dot.gw +++ b/tests/tree/dot.gw @@ -1,3 +1,2 @@ -int i[]; +var int i[]; Machine.shreds() @=> i; -#!null @=> i; diff --git a/tests/tree/dur.gw b/tests/tree/dur.gw index 111231fa..6be45330 100644 --- a/tests/tree/dur.gw +++ b/tests/tree/dur.gw @@ -1,6 +1,6 @@ samp; minute; 5::samp; -float f; +var float f; 2.4 => f; f ::samp => now; diff --git a/tests/tree/dur_exp.gw b/tests/tree/dur_exp.gw index 5d775c78..ece289c2 100644 --- a/tests/tree/dur_exp.gw +++ b/tests/tree/dur_exp.gw @@ -1,2 +1,2 @@ -second => dur d; +second => var dur d; 2.3::d; diff --git a/tests/tree/extend_typedef.gw b/tests/tree/extend_typedef.gw index 4badf3fa..f50e189d 100644 --- a/tests/tree/extend_typedef.gw +++ b/tests/tree/extend_typedef.gw @@ -1,4 +1,4 @@ typedef Object[2] Class; class C extends Class {} -C c; +var C c; <<< c >>>; diff --git a/tests/tree/extent_template.gw b/tests/tree/extent_template.gw index b805b09a..1bf01d87 100644 --- a/tests/tree/extent_template.gw +++ b/tests/tree/extent_template.gw @@ -1,7 +1,8 @@ class <~A~> C { - A a; + var A a; } class D extends <~int~>C {} -D d; + +var D d; <<>>; diff --git a/tests/tree/f2i_cast.gw b/tests/tree/f2i_cast.gw index 6dedfaaa..f1f25903 100644 --- a/tests/tree/f2i_cast.gw +++ b/tests/tree/f2i_cast.gw @@ -1,5 +1,5 @@ <<< "test" >>>; <<< 2.3 $ int >>>; -1 => float f; +1 => var float f; fun void test(float _f){} 1 => test; diff --git a/tests/tree/find_in_nspc.gw b/tests/tree/find_in_nspc.gw index 14109151..98cd2ed5 100644 --- a/tests/tree/find_in_nspc.gw +++ b/tests/tree/find_in_nspc.gw @@ -1,13 +1,13 @@ class C { class D { - int i; + var int i; } } class E extends C { - C->D d; + var C.D d; } class F { - E->D d; + var E.D d; } diff --git a/tests/tree/find_type.gw b/tests/tree/find_type.gw index 1fcc611e..0108baff 100644 --- a/tests/tree/find_type.gw +++ b/tests/tree/find_type.gw @@ -4,7 +4,8 @@ class C { } class E extends C { - D d; + var D d; } -E e; + +var E e; <<< e.d >>>; diff --git a/tests/tree/float_if.gw b/tests/tree/float_if.gw index 77e8055d..8accb0e9 100644 --- a/tests/tree/float_if.gw +++ b/tests/tree/float_if.gw @@ -1,2 +1,2 @@ -(2.0 ? "yeah" : "not yeah") => string s; +(2.0 ? "yeah" : "not yeah") => var string s; <<< s >>>; diff --git a/tests/tree/for.gw b/tests/tree/for.gw index 3f26fa3b..297a20a2 100644 --- a/tests/tree/for.gw +++ b/tests/tree/for.gw @@ -1,10 +1,10 @@ -for(int i; i < 4; i++) +for(var int i; i < 4; i++) { if(i == 2) continue; <<< i >>>; } -for(int i; i < 3;) +for(var int i; i < 3;) <<< i++ >>>; -float f; +var float f; for(1 => f; f; 1 -=>f); diff --git a/tests/tree/for_break_continue.gw b/tests/tree/for_break_continue.gw index f9b9b900..7acf0d1d 100644 --- a/tests/tree/for_break_continue.gw +++ b/tests/tree/for_break_continue.gw @@ -1,4 +1,4 @@ -for(int i; i< 3; i++) { +for(var int i; i< 3; i++) { if(maybe) break; else continue; diff --git a/tests/tree/force_type.gw b/tests/tree/force_type.gw index 776b493d..30689034 100644 --- a/tests/tree/force_type.gw +++ b/tests/tree/force_type.gw @@ -1,6 +1,6 @@ class C { - int i; + var int i; } -C c; +var C c; c $ C; diff --git a/tests/tree/fptr_call_decl.gw b/tests/tree/fptr_call_decl.gw index 601d0557..284de9a5 100644 --- a/tests/tree/fptr_call_decl.gw +++ b/tests/tree/fptr_call_decl.gw @@ -1,2 +1,2 @@ typedef void test(int); -(test t)(2); +(var test t)(2); diff --git a/tests/tree/fptr_class.gw b/tests/tree/fptr_class.gw index 920569d1..10904dbc 100644 --- a/tests/tree/fptr_class.gw +++ b/tests/tree/fptr_class.gw @@ -1,11 +1,11 @@ class C { fun void test(int i) { <<< "int arg" >>>; } typedef void ptr_t(int i); - test @=> - ptr_t p; + test @=> var ptr_t p; p(1); test @=> p; p(1); } -C c; + +var C c; <<< c >>>; diff --git a/tests/tree/fptr_global0.gw b/tests/tree/fptr_global0.gw index 2076ed56..b82faa5e 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); + typedef global void global_fptr(int i); } diff --git a/tests/tree/fptr_other_class.gw b/tests/tree/fptr_other_class.gw index ebc54691..021af700 100644 --- a/tests/tree/fptr_other_class.gw +++ b/tests/tree/fptr_other_class.gw @@ -4,5 +4,5 @@ class C { } class D { typedef void t_ptr(); - C->t_ptr ptr; + var C.t_ptr ptr; } diff --git a/tests/tree/func_extend_error.gw b/tests/tree/func_extend_error.gw index dd39ee3b..3f4d84b4 100644 --- a/tests/tree/func_extend_error.gw +++ b/tests/tree/func_extend_error.gw @@ -5,6 +5,6 @@ class Sine extends SinOsc } } -Sine s => dac; +var Sine s => dac; 220 => s.freq; second => now; diff --git a/tests/tree/gc1.gw b/tests/tree/gc1.gw index 7b7601c2..b8f32f7d 100644 --- a/tests/tree/gc1.gw +++ b/tests/tree/gc1.gw @@ -1,3 +1,3 @@ -Object o; +var Object o; <<< o >>>; me.exit(); diff --git a/tests/tree/get_type_name_test.gw b/tests/tree/get_type_name_test.gw index c75884ac..055655ea 100644 --- a/tests/tree/get_type_name_test.gw +++ b/tests/tree/get_type_name_test.gw @@ -1,4 +1,4 @@ class <~A, B~> C{} class <~A~> D {} -<~ <~int~>D, <~int~>D ~>C c; +var <~ <~int~>D, <~int~>D ~>C c; <<< c >>>; diff --git a/tests/tree/global_func3.gw b/tests/tree/global_func3.gw index 061dfa3e..82692068 100644 --- a/tests/tree/global_func3.gw +++ b/tests/tree/global_func3.gw @@ -1,4 +1,4 @@ -<<< int i >>>; +<<< var int i >>>; fun global void this_global_func_will_fail_to_compile() { <<< i >>>; } diff --git a/tests/tree/global_var.gw b/tests/tree/global_var.gw index 072245a2..9b447a4b 100644 --- a/tests/tree/global_var.gw +++ b/tests/tree/global_var.gw @@ -1 +1 @@ -<<< global int g_i >>>; +<<< global var int g_i >>>; diff --git a/tests/tree/if_obj.gw b/tests/tree/if_obj.gw index dbdbe897..04fe2650 100644 --- a/tests/tree/if_obj.gw +++ b/tests/tree/if_obj.gw @@ -1,2 +1,2 @@ -Object o; +var Object o; if(o)<<< "ok" >>>; diff --git a/tests/tree/lambda_member.gw b/tests/tree/lambda_member.gw index 3453b6b3..6a7f36b4 100644 --- a/tests/tree/lambda_member.gw +++ b/tests/tree/lambda_member.gw @@ -1,5 +1,5 @@ class C { - Event e; + var Event e; spork {second => now; e.broadcast(); }; spork \{second => now; e.broadcast(); }(); #!2::second => now; @@ -7,4 +7,4 @@ class C { e => now; } -C c; +var C c; diff --git a/tests/tree/map.gw b/tests/tree/map.gw index c224dea1..069c7afc 100644 --- a/tests/tree/map.gw +++ b/tests/tree/map.gw @@ -1,4 +1,4 @@ -<~int, int~>Map pp; +var <~int, int~>Map pp; <<< pp >>>; <<< pp.size() >>>; <<< pp.set(1, 2) >>>; diff --git a/tests/tree/member_op.gw b/tests/tree/member_op.gw index 10232855..a5b14120 100644 --- a/tests/tree/member_op.gw +++ b/tests/tree/member_op.gw @@ -3,7 +3,8 @@ class C operator => void(C c, int i){<<< c, " ", i >>>;} #! this => this; #!fun void test_op(C c){ this => c; } - this => int i; + this => var int i; } -C c; + +var C c; #!c.test_op(c); diff --git a/tests/tree/multi_decl.gw b/tests/tree/multi_decl.gw index a5e3908b..4129e3a9 100644 --- a/tests/tree/multi_decl.gw +++ b/tests/tree/multi_decl.gw @@ -1,2 +1,2 @@ -int i, j; +var int i, j; <<< i, " ", j >>>; diff --git a/tests/tree/multi_ref_decl.gw b/tests/tree/multi_ref_decl.gw index b0555aaa..dfd21404 100644 --- a/tests/tree/multi_ref_decl.gw +++ b/tests/tree/multi_ref_decl.gw @@ -1,2 +1,2 @@ -Object ref i, a; +ref Object i, a; <<< i, a >>>; diff --git a/tests/tree/named_union.gw b/tests/tree/named_union.gw index 6a8c1105..0735743e 100644 --- a/tests/tree/named_union.gw +++ b/tests/tree/named_union.gw @@ -1,9 +1,9 @@ -15 => int i; +15 => var int i; union { int i; float f; } U; -7.3 => float f; +7.3 => var float f; <<< U >>>; <<< U.i >>>; <<< U.f >>>; diff --git a/tests/tree/named_union_private_static.gw b/tests/tree/named_union_private_static.gw index 23df19af..3ac3f7ec 100644 --- a/tests/tree/named_union_private_static.gw +++ b/tests/tree/named_union_private_static.gw @@ -1,4 +1,9 @@ -class C { union static private { int i; } u;<<< this, " ", u, " ", this.u.i >>>; +class C { + union static private { + int i; + } u; + <<< this, " ", u, " ", this.u.i >>>; } -C c; + +var C c; <<< c >>>; diff --git a/tests/tree/named_union_static.gw b/tests/tree/named_union_static.gw index 6a32149f..549480c6 100644 --- a/tests/tree/named_union_static.gw +++ b/tests/tree/named_union_static.gw @@ -1,5 +1,11 @@ -class C { union static { int i; } u;<<< this, " ", u, " ", this.u.i >>>; } -C c; +class C { + union static { + int i; + } u; + <<< this, " ", u, " ", this.u.i >>>; +} + +var C c; <<< c >>>; <<< C.u >>>; <<< C.u.i >>>; diff --git a/tests/tree/new.gw b/tests/tree/new.gw index 6734daa9..8cb564e0 100644 --- a/tests/tree/new.gw +++ b/tests/tree/new.gw @@ -1,8 +1,8 @@ new Object; -new Object @=> Object refref; +new Object @=> var Object refref; new Event; -Event ev; -ev @=> Event ref e; +var Event ev; +ev @=> ref Event e; new Event @=> e; ev @=> e; null @=> e; diff --git a/tests/tree/not_global.gw b/tests/tree/not_global.gw index e5ac6bbd..12d4beb0 100644 --- a/tests/tree/not_global.gw +++ b/tests/tree/not_global.gw @@ -3,4 +3,4 @@ class C { } -global C c; +global var C c; diff --git a/tests/tree/not_object.gw b/tests/tree/not_object.gw index f9837d88..4e915e3c 100644 --- a/tests/tree/not_object.gw +++ b/tests/tree/not_object.gw @@ -1,2 +1,2 @@ -Object o; +var Object o; <<< !o >>>; diff --git a/tests/tree/object_func.gw b/tests/tree/object_func.gw index eb60ca7f..28470d6a 100644 --- a/tests/tree/object_func.gw +++ b/tests/tree/object_func.gw @@ -1,2 +1,2 @@ -fun Object test(){ Object o; <<< o >>>; return new Object; } +fun Object test(){ var Object o; <<< o >>>; return new Object; } test(); diff --git a/tests/tree/pair.gw b/tests/tree/pair.gw index 61ef1e1f..4cec49e7 100644 --- a/tests/tree/pair.gw +++ b/tests/tree/pair.gw @@ -1,4 +1,4 @@ -<~float, int~>Pair p; +var <~float, int~>Pair p; <<< p >>>; 1 => p.key; 2 => p.val; diff --git a/tests/tree/parent_match_actual.gw b/tests/tree/parent_match_actual.gw index 04cf6e90..aeaec464 100644 --- a/tests/tree/parent_match_actual.gw +++ b/tests/tree/parent_match_actual.gw @@ -1,6 +1,7 @@ class C { fun void test() {} } + class D extends C { fun void test() {} } diff --git a/tests/tree/pre_post_inc_dec.gw b/tests/tree/pre_post_inc_dec.gw index f4d89c85..937d860f 100644 --- a/tests/tree/pre_post_inc_dec.gw +++ b/tests/tree/pre_post_inc_dec.gw @@ -1,4 +1,4 @@ -int i; +var int i; <<< i++ >>>; <<< i >>>; <<< i-- >>>; diff --git a/tests/tree/private_access.gw b/tests/tree/private_access.gw index ca794794..0c4d64e6 100644 --- a/tests/tree/private_access.gw +++ b/tests/tree/private_access.gw @@ -1,3 +1,7 @@ -class C { private int i; <<< i >>>; } -C c; +class C { + private var int i; + <<< i >>>; +} + +var C c; <<< c >>>; diff --git a/tests/tree/private_func.gw b/tests/tree/private_func.gw index 11ca9a33..986bd2b9 100644 --- a/tests/tree/private_func.gw +++ b/tests/tree/private_func.gw @@ -3,5 +3,5 @@ class C { test(); } -C c; +var C c; <<< c >>>; diff --git a/tests/tree/protect.gw b/tests/tree/protect.gw index 43068202..02f82b72 100644 --- a/tests/tree/protect.gw +++ b/tests/tree/protect.gw @@ -1,8 +1,9 @@ class C { - protect int i; + protect var int i; <<< ++i >>>; } -C c; + +var C c; <<< c.i >>>; #!<<< ++c.i >>>; #!1 => c.i; diff --git a/tests/tree/ptr_decl_assign.gw b/tests/tree/ptr_decl_assign.gw index 08b4fe86..47d764ba 100644 --- a/tests/tree/ptr_decl_assign.gw +++ b/tests/tree/ptr_decl_assign.gw @@ -1,4 +1,4 @@ typedef void Test(); fun void t(){<<< "lol" >>>;} -t @=> Test test; +t @=> var Test test; test(); diff --git a/tests/tree/ptr_test.gw b/tests/tree/ptr_test.gw index e44119a4..899801c5 100644 --- a/tests/tree/ptr_test.gw +++ b/tests/tree/ptr_test.gw @@ -1,4 +1,4 @@ typedef void Test(); fun void t0(){} -t0 @=> Test test; +t0 @=> var Test test; test(); diff --git a/tests/tree/push_staticcode.gw b/tests/tree/push_staticcode.gw index c9f61720..cee57db9 100644 --- a/tests/tree/push_staticcode.gw +++ b/tests/tree/push_staticcode.gw @@ -1,9 +1,11 @@ fun void test() { test(2); } + fun void test(int i) { <<< i >>>; } + test(); test(); diff --git a/tests/tree/repeat.gw b/tests/tree/repeat.gw index baf3068c..a5893ec2 100644 --- a/tests/tree/repeat.gw +++ b/tests/tree/repeat.gw @@ -1,4 +1,4 @@ -int i; +var int i; repeat(3) { i++; <<< i >>>; diff --git a/tests/tree/return_void.gw b/tests/tree/return_void.gw index 60dbe600..bc96ee04 100644 --- a/tests/tree/return_void.gw +++ b/tests/tree/return_void.gw @@ -1,5 +1,5 @@ #! define a simple variable: 'i'. -int i; +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() >>>; diff --git a/tests/tree/set_obj.gw b/tests/tree/set_obj.gw index 30e835ce..6a7374e8 100644 --- a/tests/tree/set_obj.gw +++ b/tests/tree/set_obj.gw @@ -1,4 +1,4 @@ typedef int[2]Type; -Type nonnull type; +nonnull Type type; <<>>; foreach(ref a : type); diff --git a/tests/tree/shredule_test.gw b/tests/tree/shredule_test.gw index 9e5754f7..4ceb10c4 100644 --- a/tests/tree/shredule_test.gw +++ b/tests/tree/shredule_test.gw @@ -1,9 +1,9 @@ #! catch free gc -Event e; +var Event e; spork { e => now; }; spork { samp => now; 4::samp => now;}; -spork { 5::samp => now;} @=> Shred ref s; -spork { samp => now; 4::samp => now; } @=> Shred ref t; +spork { 5::samp => now;} @=> ref Shred s; +spork { samp => now; 4::samp => now; } @=> ref 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 66b69889..7f3a1715 100644 --- a/tests/tree/simple_assign.gw +++ b/tests/tree/simple_assign.gw @@ -1,2 +1,2 @@ -12 => int i; +12 => var int i; <<< i >>>; diff --git a/tests/tree/simple_decl.gw b/tests/tree/simple_decl.gw index 9b4ea7b6..ed751955 100644 --- a/tests/tree/simple_decl.gw +++ b/tests/tree/simple_decl.gw @@ -1,2 +1,2 @@ -int i; +var int i; <<< i >>>; diff --git a/tests/tree/simple_ref_decl.gw b/tests/tree/simple_ref_decl.gw index f4aa262f..921df645 100644 --- a/tests/tree/simple_ref_decl.gw +++ b/tests/tree/simple_ref_decl.gw @@ -1,2 +1,2 @@ -Object ref o; +ref Object o; <<< o >>>; diff --git a/tests/tree/spork_in_func.gw b/tests/tree/spork_in_func.gw index 137b15a3..4c2cafc1 100644 --- a/tests/tree/spork_in_func.gw +++ b/tests/tree/spork_in_func.gw @@ -1,7 +1,6 @@ fun void test() { - spork { <<< 2 >>>; }; + spork { <<< 2 >>>; }; } -#!spork { <<< 1 >>>; }; -#!spork test(); -test(); + +test(); second => now; diff --git a/tests/tree/spork_member.gw b/tests/tree/spork_member.gw index dcdebe68..2da463ec 100644 --- a/tests/tree/spork_member.gw +++ b/tests/tree/spork_member.gw @@ -6,12 +6,10 @@ class C <<< "test2" >>>; }; } -#! spork test(2); -#! spork { <<< "test", this >>>; }; } -C c; + +var C c; <<< c >>>; -#!spork c.test(1); c.test(2); samp => now; diff --git a/tests/tree/static_data_test.gw b/tests/tree/static_data_test.gw index 0e3baf58..38f9e0c1 100644 --- a/tests/tree/static_data_test.gw +++ b/tests/tree/static_data_test.gw @@ -1,10 +1,10 @@ class C { - static int i; - typedef static void Test(){}; - static Test test; + static var int i; + typedef static void Test(); + static var Test test; } -C c; +var C c; c.i; C.i; c.test; diff --git a/tests/tree/static_template.gw b/tests/tree/static_template.gw index 6d61f342..046b20d6 100644 --- a/tests/tree/static_template.gw +++ b/tests/tree/static_template.gw @@ -1,11 +1,11 @@ class<~A~> C { - A a; + var A a; } class D { - static <~int~>C c; + static var <~int~>C c; } -D d; +var D d; <<< d >>>; <<< D.c.a >>>; diff --git a/tests/tree/string_eq.gw b/tests/tree/string_eq.gw index 249b6122..2fe5379d 100644 --- a/tests/tree/string_eq.gw +++ b/tests/tree/string_eq.gw @@ -1,4 +1,4 @@ <<< "test" == "test" >>>; -string s; +var string s; <<< s == s >>>; <<< "test" == s >>>; diff --git a/tests/tree/template_class_invalid_type_number.gw b/tests/tree/template_class_invalid_type_number.gw index 00ee4972..8529c33b 100644 --- a/tests/tree/template_class_invalid_type_number.gw +++ b/tests/tree/template_class_invalid_type_number.gw @@ -1,2 +1,3 @@ class <~A~>C {} -<~int, float~>C c; + +var <~int, float~>C c; diff --git a/tests/tree/template_class_ref.gw b/tests/tree/template_class_ref.gw index ce49741b..eeef0582 100644 --- a/tests/tree/template_class_ref.gw +++ b/tests/tree/template_class_ref.gw @@ -1,4 +1,4 @@ class<~A~> C {} -<~int~>C c; +var <~int~>C c; <<< c >>>; diff --git a/tests/tree/template_fptr.gw b/tests/tree/template_fptr.gw index 3a130d9f..1b0d0a4b 100644 --- a/tests/tree/template_fptr.gw +++ b/tests/tree/template_fptr.gw @@ -1,11 +1,9 @@ typedef int ptr_t<~A~>(A); -ptr_t ptr; +var ptr_t ptr; <<>>; fun int test<~A~>(A a) { <<< a >>>; } test @=> ptr; <<< ptr >>>; -#!3; -#!3 => test; ptr<~int~>(2); ptr<~float~>(2.3); diff --git a/tests/tree/template_self.gw b/tests/tree/template_self.gw index eb852ddc..632f97df 100644 --- a/tests/tree/template_self.gw +++ b/tests/tree/template_self.gw @@ -1,7 +1,7 @@ class <~A~>C { fun void test() { - <~A~>C c; + var <~A~>C c; } } -<~int~>C c; +var <~int~>C c; diff --git a/tests/tree/template_typedef.gw b/tests/tree/template_typedef.gw index 2edaf7f5..747c12e7 100644 --- a/tests/tree/template_typedef.gw +++ b/tests/tree/template_typedef.gw @@ -1,20 +1,20 @@ -<~int, int~>Pair p; +var <~int, int~>Pair p; typedef <~int, int~>Pair lol; -lol t; +var lol t; <<< t >>>; <<< t.key >>>; -class C extends lol { int i;} -C c; +class C extends lol { var int i;} +var C c; <<< c.i >>>; class<~A~> D { <<< "lol" >>>; - int i; + var int i; } typedef <~int~>D Lol; class E extends Lol { - float f; + var float f; } -E d; +var E d; <<< d >>>; <<< d.i >>>; <<< d.f >>>; diff --git a/tests/tree/this.gw b/tests/tree/this.gw index 890fa20d..7b35672f 100644 --- a/tests/tree/this.gw +++ b/tests/tree/this.gw @@ -5,5 +5,5 @@ class C } } -C c; +var C c; c.test(); diff --git a/tests/tree/this_valid.gw b/tests/tree/this_valid.gw index 54bb94b5..28d57b13 100644 --- a/tests/tree/this_valid.gw +++ b/tests/tree/this_valid.gw @@ -5,5 +5,5 @@ class C } } -C c; +var C c; c.test(); diff --git a/tests/tree/typedef_auto_loop.gw b/tests/tree/typedef_auto_loop.gw index 37e58a13..9c300b43 100644 --- a/tests/tree/typedef_auto_loop.gw +++ b/tests/tree/typedef_auto_loop.gw @@ -1,3 +1,3 @@ typedef int[2] Type; -Type type; +var Type type; foreach(a : type); diff --git a/tests/tree/typedef_func.gw b/tests/tree/typedef_func.gw index a521755d..cf506d70 100644 --- a/tests/tree/typedef_func.gw +++ b/tests/tree/typedef_func.gw @@ -1,6 +1,6 @@ typedef void t_ptr(int i); typedef t_ptr A; -A a; +var A a; <<>>; fun void test(int i) { <<< __func__ , " ", i>>>; } diff --git a/tests/tree/typedef_func_class.gw b/tests/tree/typedef_func_class.gw index f77ac2f7..44d9277e 100644 --- a/tests/tree/typedef_func_class.gw +++ b/tests/tree/typedef_func_class.gw @@ -1,7 +1,7 @@ class C { typedef void t_ptr(); typedef t_ptr A; -A a; +var A a; <<>>; fun void test() { <<< __func__ >>>; } @@ -11,4 +11,4 @@ a(); a(); } -C c; +var C c; diff --git a/tests/tree/typedef_func_tmpl.gw b/tests/tree/typedef_func_tmpl.gw index cfa7ddff..0db03853 100644 --- a/tests/tree/typedef_func_tmpl.gw +++ b/tests/tree/typedef_func_tmpl.gw @@ -1,7 +1,7 @@ typedef void t_ptr<~A~>(); -<~int~>t_ptr iptr; -<~float~>t_ptr fptr; +var <~int~>t_ptr iptr; +var <~float~>t_ptr fptr; fun void test<~A~>() { <<< __func__ >>>; diff --git a/tests/tree/typedef_func_tmpl2.gw b/tests/tree/typedef_func_tmpl2.gw index 98e11c31..6a3507db 100644 --- a/tests/tree/typedef_func_tmpl2.gw +++ b/tests/tree/typedef_func_tmpl2.gw @@ -4,7 +4,7 @@ fun void test<~A~>() { } typedef <~int~>t_ptr B; -B b; +var B b; <<< b >>>; test @=> b; <<< b >>>; @@ -13,7 +13,7 @@ test @=> b; typedef <~float~>t_ptr C; -C c; +var C c; <<< c >>>; test @=> c; <<< c >>>; diff --git a/tests/tree/typedef_func_tmpl_class.gw b/tests/tree/typedef_func_tmpl_class.gw index 3b91c5a2..3bf281c3 100644 --- a/tests/tree/typedef_func_tmpl_class.gw +++ b/tests/tree/typedef_func_tmpl_class.gw @@ -1,7 +1,7 @@ class C { typedef void t_ptr<~A~>(); - <~int~>t_ptr iptr; + var <~int~>t_ptr iptr; fun void test<~A~>() { <<< this, " ", __func__ >>>; @@ -11,6 +11,6 @@ class C { <<< iptr() >>>; #! <<< iptr() >>>; } -<<>>; +<<>>; <<< c.iptr() >>>; #! <<< c.iptr() >>>; diff --git a/tests/tree/unary.gw b/tests/tree/unary.gw index c6566f03..1395afe3 100644 --- a/tests/tree/unary.gw +++ b/tests/tree/unary.gw @@ -1,2 +1,2 @@ -int i; +var int i; i++; diff --git a/tests/tree/uncalled_functions.gw b/tests/tree/uncalled_functions.gw index 82e30fd7..f0e66b53 100644 --- a/tests/tree/uncalled_functions.gw +++ b/tests/tree/uncalled_functions.gw @@ -1,8 +1,8 @@ #! just to check uncalled fun to not push the stack class C { fun void test(){} fun static void stest() {}} -C c; -Event e; +var C c; +var Event e; c.test; C.stest; diff --git a/tests/tree/undefined.gw b/tests/tree/undefined.gw index cc4d5fc3..0cc21886 100644 --- a/tests/tree/undefined.gw +++ b/tests/tree/undefined.gw @@ -1,2 +1 @@ - -typeof(typeof(1)) i; +var typeof(typeof(1)) i; diff --git a/tests/tree/union_tmpl.gw b/tests/tree/union_tmpl.gw index 3c0d93f3..0cc89600 100644 --- a/tests/tree/union_tmpl.gw +++ b/tests/tree/union_tmpl.gw @@ -3,5 +3,5 @@ union <~A~> U{ A a; }; -<~float~>U u; +var <~float~>U u; <<< u.a >>>; diff --git a/tests/tree/until.gw b/tests/tree/until.gw index d9d47297..2b9a23ae 100644 --- a/tests/tree/until.gw +++ b/tests/tree/until.gw @@ -1,12 +1,12 @@ -int i; -now + 1.0::samp => time t; +var int i; +now + 1.0::samp => var time t; until(now >= t) { i++; if(i == 3) me.exit(); samp => now; } -float f; +var float f; until(f) { 1 +=> f; } diff --git a/tests/tree/usr_unary.gw b/tests/tree/usr_unary.gw index 8d60035c..fcc4e01d 100644 --- a/tests/tree/usr_unary.gw +++ b/tests/tree/usr_unary.gw @@ -1,9 +1,13 @@ -class C { int i; } +class C { + var int i; +} + ++ operator int (C c) { <<< "test" >>>; <<< c >>>; <<< ++c.i >>>; } -C c; + +var C c; <<< c >>>; ++c; diff --git a/tests/tree/varobject_assign.gw b/tests/tree/varobject_assign.gw index 23a891ca..824f2c4c 100644 --- a/tests/tree/varobject_assign.gw +++ b/tests/tree/varobject_assign.gw @@ -1,5 +1,5 @@ fun void test(...) { - Object o; + var Object o; vararg.start; vararg $ Object @=> o; vararg.end; diff --git a/tests/tree/while.gw b/tests/tree/while.gw index 9c757047..b252a4fc 100644 --- a/tests/tree/while.gw +++ b/tests/tree/while.gw @@ -1,5 +1,5 @@ -int i; -now + 3::samp => time t; +var int i; +now + 3::samp => var time t; while(now < t) { i++; samp => now; -- 2.43.0