Skip to content

Commit

Permalink
🎨 Use 'typeof(...)' instead of ''
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed Dec 15, 2019
1 parent 6e84666 commit 3eab23d
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ast
Submodule ast updated from 32ad70 to 2f8b2c
2 changes: 1 addition & 1 deletion examples/typeof_decl.gw
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
int i;
<<<`i` j>>>;
<<<typeof(i) j>>>;
2 changes: 1 addition & 1 deletion tests/error/typeof_error.gw
Original file line number Diff line number Diff line change
@@ -1 +1 @@
` 1 + 2 ` i;
typeof( 1 + 2 ) i;
2 changes: 1 addition & 1 deletion tests/new/invalid_decl_exp.gw
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
`1` i;
typeof(1) i;
<<< i >>>;
6 changes: 3 additions & 3 deletions tests/new/lambda.gw
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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 >>>; }
#! fun void test(ptr_t t, int i) {
#!<<< t >>>;
#! t(2,i);
#! }
#! test(`a,b` { <<< this, " lambda argument" >>>; }, 2);
#! test(typeof(a,b) { <<< this, " lambda argument" >>>; }, 2);
}
#!<<< C c >>>;
C c;
Expand All @@ -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;
2 changes: 1 addition & 1 deletion tests/new/noxid.gw
Original file line number Diff line number Diff line change
@@ -1 +1 @@
`1` i;
typeof(1) i;
2 changes: 1 addition & 1 deletion tests/tree/check_td_arg.gw
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fun void test(`1` i) {}
fun void test(typeof(1) i) {}
2 changes: 1 addition & 1 deletion tests/tree/check_td_array.gw
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
int array[][][];
`array` other_array;
typeof(array) other_array;
<<< other_array >>>;
2 changes: 1 addition & 1 deletion tests/tree/cpy_ast.gw
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class <~A~>C {
\a{};
[ 1 ];
int i,j;
`i` k;
typeof(i) k;
@(0);
'a';
true $ int;
Expand Down
2 changes: 1 addition & 1 deletion tests/tree/decl_exp_array.gw
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<<< ` new int[2] ` i >>>;
<<< typeof( new int[2] ) i >>>;
<<< i >>>;
2 changes: 1 addition & 1 deletion tests/tree/func_check_td.gw
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fun `1` test() {}
fun typeof(1) test() {}

2 changes: 1 addition & 1 deletion tests/tree/undefined.gw
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

`typeof(1)` i;
typeof(typeof(1)) i;

0 comments on commit 3eab23d

Please sign in to comment.