Typedef works for simple case

This commit is contained in:
Krzosa Karol
2022-05-27 15:18:07 +02:00
parent 8875b61970
commit 79aa52e726
4 changed files with 33 additions and 26 deletions

View File

@@ -280,6 +280,7 @@ gen_ast(Ast *ast){
else if(sym->type == type_type){
gen("typedef ");
gen_simple_decl(sym->type_val, node->name);
gen(";");
}
else{
parsing_error(node->pos, "C_Codegen: Unhandled type of constant expression");