Folding constant enum access into constant int value

This commit is contained in:
Krzosa Karol
2022-05-31 13:10:56 +02:00
parent 627e2bad88
commit 437a776d78
5 changed files with 71 additions and 17 deletions

View File

@@ -593,4 +593,14 @@ query_struct(Ast_Struct *agg, Intern_String string){
}
}
return 0;
}
function Ast_Enum_Member *
query_enum(Ast_Enum *enu, Intern_String string){
For(enu->members){
if(it->name == string){
return it;
}
}
return 0;
}