mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Partial codegen
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user