- allow functions in structs. This is needed for several internal data types like players, sectors, lines, etc.

- added a new type 'NativeStruct'. This will be used for types that cannot be instantiated, and is also needed to cleanly handle many internal types that only can exist as reference.
This commit is contained in:
Christoph Oelckers 2016-11-19 12:12:29 +01:00
parent df4e9324c9
commit f11f020b6c
11 changed files with 453 additions and 370 deletions

View file

@ -202,19 +202,19 @@ struct ZCC_NamedNode : ZCC_TreeNode
PSymbolType *Symbol;
};
struct ZCC_Class : ZCC_NamedNode
struct ZCC_Struct : ZCC_NamedNode
{
VM_UWORD Flags;
ZCC_TreeNode *Body;
PStruct *Type;
};
struct ZCC_Class : ZCC_Struct
{
ZCC_Identifier *ParentName;
ZCC_Identifier *Replaces;
VM_UWORD Flags;
ZCC_TreeNode *Body;
PClass *Type;
};
struct ZCC_Struct : ZCC_NamedNode
{
ZCC_TreeNode *Body;
PStruct *Type;
PClass *CType() { return static_cast<PClass *>(Type); }
};
struct ZCC_Enum : ZCC_NamedNode