Christoffer Lerno

Results 1210 comments of Christoffer Lerno

For this: ``` case TYPE_FLEXIBLE_ARRAY: TODO case TYPE_SUBARRAY: TODO ``` Replace with: ```c case TYPE_FLEXIBLE_ARRAY: header_print_type(type->array.base); OUTPUT("[]"); break; case TYPE_SUBARRAY: OUTPUT("c3_subarray"); break; ``` Then elsewhere define: ```c #ifndef c3_subarray typedef...

`fault` should just be `typedef uintptr_t OptionalResult` The failable (optional) type is a bit more complicated. A parameter cannot be an optional but a return value can. In that case,...

I don't know if it's suitable for parameterized types to be emitted into the C headers. $ is available as GCC extension so it will work for Clang/GCC at least.

And I'll have a look at your branch tomorrow

I thought you were doing the headers, but this looks like you're doing C3 -> C compilation?

You shouldn't ever convert expressions or statements though @Andersama

What you're doing if you're doing pure C output is essentially a C backend. Getting headers is so that C code can easily use C3 code that's either in .o...

I can integrate what you did for the headers (types + function declarations + globals) into the main branch, but the expression and statement lowering is a huge work and...

The functionality producing headers are intended for creating static and dynamic languages to be used with C/C++. So there should not be any need to use the statements. And there...

1. Memory mapping and so on are welcome additions. If you need something that works with the standard library you can add the required linking by adding arguments in the...