Fix struct function ordering in c files
This commit is contained in:
15
ccodegen.cpp
15
ccodegen.cpp
@@ -771,11 +771,6 @@ typedef struct String{
|
||||
if(it->kind == AST_STRUCT){
|
||||
genln("typedef struct %Q %Q;", it->name, it->name);
|
||||
}
|
||||
|
||||
else if(it->kind == AST_LAMBDA){
|
||||
genln("");
|
||||
gen_lambda(it->name, it->lambda, false);
|
||||
}
|
||||
}
|
||||
|
||||
Scratch scratch;
|
||||
@@ -808,9 +803,17 @@ typedef struct String{
|
||||
global_indent--;
|
||||
genln("} Tuple%llu;", type->type_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
For(pctx->ordered_decls){
|
||||
if(it->kind == AST_LAMBDA){
|
||||
genln("");
|
||||
gen_lambda(it->name, it->lambda, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
For(pctx->ordered_decls){
|
||||
genln("");
|
||||
gen_ast(it);
|
||||
|
||||
Reference in New Issue
Block a user