make meta & eval type system a bit richer to express plain text vs. code text vs. path text

This commit is contained in:
Ryan Fleury
2024-10-01 12:04:40 -07:00
parent 685cb4a3b8
commit 911f9ef97b
5 changed files with 41 additions and 54 deletions
+4 -12
View File
@@ -455,18 +455,10 @@ e_type_key_cons_base(Type *type)
{
E_TypeKey direct_type = e_type_key_cons_base(type->direct);
E_TypeFlags flags = 0;
if(type->flags & TypeFlag_IsExternal)
{
flags |= E_TypeFlag_External;
}
if(type->flags & TypeFlag_IsCode)
{
flags |= E_TypeFlag_IsCode;
}
if(type->flags & TypeFlag_IsPath)
{
flags |= E_TypeFlag_IsPath;
}
if(type->flags & TypeFlag_IsExternal) { flags |= E_TypeFlag_External; }
if(type->flags & TypeFlag_IsPlainText){ flags |= E_TypeFlag_IsPlainText; }
if(type->flags & TypeFlag_IsCodeText) { flags |= E_TypeFlag_IsCodeText; }
if(type->flags & TypeFlag_IsPathText) { flags |= E_TypeFlag_IsPathText; }
result = e_type_key_cons_ptr(arch_from_context(), direct_type, flags);
}break;
case TypeKind_Array:
+6 -5
View File
@@ -66,11 +66,12 @@ E_MemberKind;
typedef U32 E_TypeFlags;
enum
{
E_TypeFlag_Const = (1<<0),
E_TypeFlag_Volatile = (1<<1),
E_TypeFlag_External = (1<<2),
E_TypeFlag_IsCode = (1<<3),
E_TypeFlag_IsPath = (1<<4),
E_TypeFlag_Const = (1<<0),
E_TypeFlag_Volatile = (1<<1),
E_TypeFlag_External = (1<<2),
E_TypeFlag_IsPlainText= (1<<3),
E_TypeFlag_IsCodeText = (1<<4),
E_TypeFlag_IsPathText = (1<<5),
};
typedef struct E_Member E_Member;