Added $converable / $castable. Simplify and corrected if try/catch parsing. Fix bug with { [A] = 1 }

This commit is contained in:
Christoffer Lerno
2022-07-24 15:01:48 +02:00
committed by Christoffer Lerno
parent 7e0a29ef40
commit 812bd8b3d0
22 changed files with 117 additions and 132 deletions

View File

@@ -1,7 +1,7 @@
const int CONSTANT = 1;
int[CONSTANT] a2;
int[3] a3 = { [CONSTANT] = 1 };
const bool B = true;
int[B] c2; // #error: Expected an integer size.

View File

@@ -4,7 +4,7 @@ fn void test1()
int! a;
int b;
int*! x;
if (try int &a = a) {} // #error: A new variable was expected.
if (try int 1 = a) {} // #error: A new variable was expected.
}
fn void test2()

View File

@@ -1,7 +1,7 @@
const int CONSTANT = 1;
int[CONSTANT] a2;
int[3] a3 = { [CONSTANT] = 1 };
const bool B = true;
int[B] c2; // #error: Expected an integer size.

View File

@@ -4,7 +4,7 @@ fn void test1()
int! a;
int b;
int*! x;
if (try int &a = a) {} // #error: A new variable was expected.
if (try int 1 = a) {} // #error: A new variable was expected.
}
fn void test2()