Added ulong and long type to builtins.d

entity_declaration_type_checking
Tristan B. V. Kildaire 2021-04-26 09:52:31 +02:00
parent 170824be61
commit 2bbdd50373
1 changed files with 10 additions and 0 deletions

View File

@ -20,6 +20,16 @@ public Type getBuiltInType(string typeString)
{
return new Integer("uint", 4, false);
}
/* `long`, signed (2-complement) */
if(cmp(typeString, "long") == 0)
{
return new Integer("long", 8, true);
}
/* `ulong` unsigned */
else if(cmp(typeString, "ulong") == 0)
{
return new Integer("ulong", 8, false);
}
/* TODO: Add all remaining types */
/* If unknown, return null */
else