Browse Source

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)
constants
Tristan B. V. Kildaire 10 months ago
parent
commit
e9a60380b6
  1. 7
      source/tlang/compiler/symbols/typing/core.d

7
source/tlang/compiler/symbols/typing/core.d

@ -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;
}

Loading…
Cancel
Save