Pointer type now only requires you provide it the data type of the data being pointed to.

The name of the type will be automatically constructed as `dataType*` (if `dataType` was the type of the data being pointed to)
This commit is contained in:
Tristan B. Velloza Kildaire 2022-04-13 09:35:46 +02:00
parent 6412241185
commit e9a60380b6
1 changed files with 5 additions and 2 deletions

View File

@ -105,9 +105,12 @@ public class Pointer : Integer
/* Data type being pointed to */
private Type dataType;
this(string name, Type dataType)
this(Type dataType)
{
/* TODO: Change below, per architetcure */
/* The name should be `dataType*` */
string name = dataType.toString()~"*";
/* TODO: Change below, per architetcure (the 8 byte width) */
super(name, 8);
this.dataType = dataType;
}