From bf6a724783904ae9a4d938c36c452fbc45391b5e Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Sun, 6 Jun 2021 18:42:23 +0200 Subject: [PATCH] Added intermediary type to differentiate between user-defined types, Class, Struct and built-in types like Number and Void --- source/tlang/compiler/symbols/typing/core.d | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/tlang/compiler/symbols/typing/core.d b/source/tlang/compiler/symbols/typing/core.d index d42fcf2..d3bf83e 100644 --- a/source/tlang/compiler/symbols/typing/core.d +++ b/source/tlang/compiler/symbols/typing/core.d @@ -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;