Implemented C variadic arguments
This commit is contained in:
@@ -339,6 +339,10 @@ gen_lambda(Intern_String name, Ast_Lambda *lambda, B32 generate_block = true) {
|
||||
gen("(");
|
||||
if (lambda->args.len == 0) gen("void");
|
||||
For(lambda->args) {
|
||||
if (it->name == pctx->intern("..."_s)) {
|
||||
gen("...");
|
||||
continue;
|
||||
}
|
||||
gen_var(it, DONT_EMIT_VALUE, true);
|
||||
if (&it != (lambda->args.end() - 1))
|
||||
gen(", ");
|
||||
@@ -935,6 +939,7 @@ compile_to_c_code() {
|
||||
global_indent++;
|
||||
For2(pctx->all_types, t) {
|
||||
if (t->kind == TYPE_POLYMORPH) continue;
|
||||
// if (t->kind == TYPE_VARGS) continue;
|
||||
|
||||
genln("{/*%Q*/", typestring(t));
|
||||
global_indent += 1;
|
||||
|
||||
Reference in New Issue
Block a user