Folding constant enum access into constant int value
This commit is contained in:
10
new_ast.cpp
10
new_ast.cpp
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user