From 3eab23dd4df00905fd0ad9fa852e7ca21b1e0264 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 15 Dec 2019 15:31:00 +0100 Subject: [PATCH] :art: Use 'typeof(...)' instead of '' --- ast | 2 +- examples/typeof_decl.gw | 2 +- tests/error/typeof_error.gw | 2 +- tests/new/invalid_decl_exp.gw | 2 +- tests/new/lambda.gw | 6 +++--- tests/new/noxid.gw | 2 +- tests/tree/check_td_arg.gw | 2 +- tests/tree/check_td_array.gw | 2 +- tests/tree/cpy_ast.gw | 2 +- tests/tree/decl_exp_array.gw | 2 +- tests/tree/func_check_td.gw | 2 +- tests/tree/undefined.gw | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ast b/ast index 32ad70fb..2f8b2cbe 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 32ad70fb10178dbe20c2a587a200f7e9b83514c4 +Subproject commit 2f8b2cbef38f0680124647d6c707cebf0da9d9cf diff --git a/examples/typeof_decl.gw b/examples/typeof_decl.gw index a7125644..7d5d8bf5 100644 --- a/examples/typeof_decl.gw +++ b/examples/typeof_decl.gw @@ -1,2 +1,2 @@ int i; -<<<`i` j>>>; +<<>>; diff --git a/tests/error/typeof_error.gw b/tests/error/typeof_error.gw index 7c727c8d..a621e38e 100644 --- a/tests/error/typeof_error.gw +++ b/tests/error/typeof_error.gw @@ -1 +1 @@ -` 1 + 2 ` i; \ No newline at end of file +typeof( 1 + 2 ) i; \ No newline at end of file diff --git a/tests/new/invalid_decl_exp.gw b/tests/new/invalid_decl_exp.gw index 7f9438d7..2eb33ffc 100644 --- a/tests/new/invalid_decl_exp.gw +++ b/tests/new/invalid_decl_exp.gw @@ -1,2 +1,2 @@ -`1` i; +typeof(1) i; <<< i >>>; diff --git a/tests/new/lambda.gw b/tests/new/lambda.gw index 8481c1c0..4e1a697c 100644 --- a/tests/new/lambda.gw +++ b/tests/new/lambda.gw @@ -1,7 +1,7 @@ class C { typedef void ptr_t(int i,int j); \a b { <<< this, " ", a, " ", b, " test" >>>; } @=> ptr_t ptr; -#! `a,b` { <<< "test" >>>; } @=> +#! typeof(a,b) { <<< "test" >>>; } @=> #! ptr_t ptr; #! ptr(1,2); fun void test(int i, int j) { <<< this, " ", i, " ", j >>>; } @@ -9,7 +9,7 @@ class C { #!<<< t >>>; #! t(2,i); #! } -#! test(`a,b` { <<< this, " lambda argument" >>>; }, 2); +#! test(typeof(a,b) { <<< this, " lambda argument" >>>; }, 2); } #!<<< C c >>>; C c; @@ -26,7 +26,7 @@ c.ptr(1, 2); #!c.ptr(1, 2); #!c.ptr(1, 2); #!(1,2) => c.ptr; -#!c.test(`a,b` { <<< this, "lambda argument" >>>; }, 2); +#!c.test(typeof(a,b) { <<< this, "lambda argument" >>>; }, 2); #!c.test(c.ptr, 2); #!<<< c.ptr >>>; #!c.ptr; diff --git a/tests/new/noxid.gw b/tests/new/noxid.gw index 6470df64..7331f8a7 100644 --- a/tests/new/noxid.gw +++ b/tests/new/noxid.gw @@ -1 +1 @@ -`1` i; +typeof(1) i; diff --git a/tests/tree/check_td_arg.gw b/tests/tree/check_td_arg.gw index 139e3907..2fbc7d91 100644 --- a/tests/tree/check_td_arg.gw +++ b/tests/tree/check_td_arg.gw @@ -1 +1 @@ -fun void test(`1` i) {} +fun void test(typeof(1) i) {} diff --git a/tests/tree/check_td_array.gw b/tests/tree/check_td_array.gw index 6638e2b2..77607214 100644 --- a/tests/tree/check_td_array.gw +++ b/tests/tree/check_td_array.gw @@ -1,3 +1,3 @@ int array[][][]; -`array` other_array; +typeof(array) other_array; <<< other_array >>>; diff --git a/tests/tree/cpy_ast.gw b/tests/tree/cpy_ast.gw index 94319435..3e95ee8d 100644 --- a/tests/tree/cpy_ast.gw +++ b/tests/tree/cpy_ast.gw @@ -2,7 +2,7 @@ class <~A~>C { \a{}; [ 1 ]; int i,j; - `i` k; + typeof(i) k; @(0); 'a'; true $ int; diff --git a/tests/tree/decl_exp_array.gw b/tests/tree/decl_exp_array.gw index 5d0bd869..26db0ea1 100644 --- a/tests/tree/decl_exp_array.gw +++ b/tests/tree/decl_exp_array.gw @@ -1,2 +1,2 @@ -<<< ` new int[2] ` i >>>; +<<< typeof( new int[2] ) i >>>; <<< i >>>; \ No newline at end of file diff --git a/tests/tree/func_check_td.gw b/tests/tree/func_check_td.gw index eaf9d0b2..d96881dd 100644 --- a/tests/tree/func_check_td.gw +++ b/tests/tree/func_check_td.gw @@ -1,2 +1,2 @@ -fun `1` test() {} +fun typeof(1) test() {} diff --git a/tests/tree/undefined.gw b/tests/tree/undefined.gw index 64821e36..cc4d5fc3 100644 --- a/tests/tree/undefined.gw +++ b/tests/tree/undefined.gw @@ -1,2 +1,2 @@ -`typeof(1)` i; +typeof(typeof(1)) i; -- 2.43.0