Added intermediary type to differentiate between user-defined types, Class, Struct and built-in types like Number and Void

This commit is contained in:
Tristan B. Kildaire 2021-06-06 18:42:23 +02:00
parent dd1ac9bdc3
commit bf6a724783
1 changed files with 10 additions and 2 deletions

View File

@ -21,7 +21,7 @@ public class Type : Entity
}
}
public final class Void : Type
public final class Void : Primitive
{
this()
{
@ -29,8 +29,16 @@ public final class Void : Type
}
}
public class Primitive : Type
{
this(string name)
{
super(name);
}
}
/* TODO: Move width to Type class */
public class Number : Type
public class Number : Primitive
{
/* Number of bytes (1,2,4,8) */
private ubyte width;