mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Refactor type handling, some extremely simple codegen, but mostly work on casts (not finished)
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
module foo;
|
||||
|
||||
struct Foo
|
||||
{
|
||||
int i;
|
||||
Bar *x;
|
||||
}
|
||||
|
||||
struct Bar
|
||||
{
|
||||
Foo foo;
|
||||
Foo* fooPtr;
|
||||
}
|
||||
|
||||
func void test()
|
||||
{
|
||||
int i = 1;
|
||||
int j, k;
|
||||
int l, m = 0;
|
||||
int o = 0, p = 3;
|
||||
short f = -2;
|
||||
c_int x = 2;
|
||||
return;
|
||||
}
|
||||
|
||||
func int test2()
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -8,7 +8,6 @@ macro void @foo(int i, $e)
|
||||
$e = 1;
|
||||
printf("Helo");
|
||||
}
|
||||
|
||||
macro @goo(i, $e)
|
||||
{
|
||||
|
||||
@@ -34,6 +33,7 @@ enum FEok : int {
|
||||
IFEJ
|
||||
}
|
||||
|
||||
|
||||
enum Test
|
||||
{
|
||||
FOO = 1 + 2,
|
||||
@@ -84,7 +84,7 @@ generic boor2(i)
|
||||
case int:
|
||||
return "Helo";
|
||||
default:
|
||||
return 1000;
|
||||
return 10001;
|
||||
}
|
||||
|
||||
$if ($e > 0)
|
||||
|
||||
Reference in New Issue
Block a user