mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-17 16:38:22 +00:00
Change naming convention from Ada_Like to RustLike
Naming Conventions: In general, PascalCase for types and snake_case for values Import Name: snake_case (but prefer single word) Types: PascalCase Union Variants: PascalCase Enum Values: PascalCase Procedures: snake_case Local Variables: snake_case Constant Variables: SCREAMING_SNAKE_CASE
This commit is contained in:
@@ -1201,22 +1201,22 @@ void init_preload(Checker *c) {
|
||||
}
|
||||
|
||||
if (t_type_info == NULL) {
|
||||
Entity *type_info_entity = find_core_entity(c, str_lit("Type_Info"));
|
||||
Entity *type_info_entity = find_core_entity(c, str_lit("TypeInfo"));
|
||||
|
||||
t_type_info = type_info_entity->type;
|
||||
t_type_info_ptr = make_type_pointer(c->allocator, t_type_info);
|
||||
GB_ASSERT(is_type_union(type_info_entity->type));
|
||||
TypeRecord *record = &base_type(type_info_entity->type)->Record;
|
||||
|
||||
t_type_info_record = find_core_entity(c, str_lit("Type_Info_Record"))->type;
|
||||
t_type_info_record = find_core_entity(c, str_lit("TypeInfoRecord"))->type;
|
||||
t_type_info_record_ptr = make_type_pointer(c->allocator, t_type_info_record);
|
||||
t_type_info_enum_value = find_core_entity(c, str_lit("Type_Info_Enum_Value"))->type;
|
||||
t_type_info_enum_value = find_core_entity(c, str_lit("TypeInfoEnumValue"))->type;
|
||||
t_type_info_enum_value_ptr = make_type_pointer(c->allocator, t_type_info_enum_value);
|
||||
|
||||
|
||||
|
||||
if (record->variant_count != 22) {
|
||||
compiler_error("Invalid `Type_Info` layout");
|
||||
compiler_error("Invalid `TypeInfo` layout");
|
||||
}
|
||||
t_type_info_named = record->variants[ 1]->type;
|
||||
t_type_info_integer = record->variants[ 2]->type;
|
||||
@@ -1277,12 +1277,12 @@ void init_preload(Checker *c) {
|
||||
}
|
||||
|
||||
if (t_map_key == NULL) {
|
||||
Entity *e = find_core_entity(c, str_lit("__Map_Key"));
|
||||
Entity *e = find_core_entity(c, str_lit("__MapKey"));
|
||||
t_map_key = e->type;
|
||||
}
|
||||
|
||||
if (t_map_header == NULL) {
|
||||
Entity *e = find_core_entity(c, str_lit("__Map_Header"));
|
||||
Entity *e = find_core_entity(c, str_lit("__MapHeader"));
|
||||
t_map_header = e->type;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user