Initial work on throws. Cleanup of AST printout (incomplete!). Fixed issues with dead code after return.

This commit is contained in:
Christoffer Lerno
2019-11-28 22:24:10 +01:00
parent aee3f99ea7
commit acf7efded4
18 changed files with 146 additions and 68 deletions

View File

@@ -158,7 +158,7 @@ func void hello() throws Errors
type(foo::y) z;
type(int) * 2;
$error = type(int);
int[4] a;
double[4] a;
foo[1 + 2] * b;
type((i > 0) ? type(int) : type(double)) doek;
$e = type(type(type(Bar)));

View File

@@ -69,10 +69,25 @@ typedef func void(int) as Foo;
func void printf(char *hello);
macro @hello()
{
printf("Hello world!\n");
}
func int main(int x)
{
int i = 0;
JUMP:
i = i + 1;
//@hello();
printf("Hello worldABC" "D" "E\u2701\n");
if (i < 10) goto JUMP;
goto EX;
YEF:
return 4 * test3();
EX:
printf("EX\n");
goto YEF;
}
func void test2(int* x, int y, int z)