mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Initial work on throws. Cleanup of AST printout (incomplete!). Fixed issues with dead code after return.
This commit is contained in:
@@ -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)));
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user