Partial codegen

This commit is contained in:
Christoffer Lerno
2019-09-03 17:42:08 +02:00
parent 2eb91083a6
commit 0dba2b8569
16 changed files with 1802 additions and 1661 deletions

View File

@@ -12,14 +12,50 @@ struct Bar
Foo* fooPtr;
}
func int boo()
{
bool z = 123 > 3.0;
{
int x = 0;
}
{
int x = 1;
}
int j = 10;
do
{
j = j + 10;
} while (j > 2);
return 1;
}
func void while_test()
{
int a = 10;
while (int b = 37; a > 0)
{
int xy = 1;
}
}
func void test()
{
int i = 1;
int a = 10;
while (1)
{
int xy = 1;
}
int eokfe = boo();
int i = -1;
bool dwf = !2.0;
ushort b = ~cast(byte, 0);
int j, k;
int l, m = 0;
int o = 0, p = 3;
short f = -2;
c_int x = 2;
short f = cast(byte, cast(int,-2));
//int doek = ~2;
return;
}

View File

@@ -60,6 +60,18 @@ error Errors
func Foom test(int a)
{
while (int x = 0, int y = 3; int y = foo())
{
a++;
}
while (int x = 0)
{
a++;
}
while (int x, y = 3; x > 0 && b < 0)
{
a++;
}
return 1 + 2;
}