- added property definitions to the ZScript parser. This will allow defining custom properties for the default block in custom base classes. See 'Health' for an example.

- support transient object member variables for information that does not need to be put in a savegame.
- fixed: special initialization of objects needs to pass the proper defaults along, otherwise the parent classes will use their own, inappropriate one.
This commit is contained in:
Christoph Oelckers 2017-01-15 16:55:30 +01:00
commit 179b6e1a39
21 changed files with 313 additions and 109 deletions

View file

@ -35,6 +35,7 @@ enum
ZCC_Extension = 1 << 12,
ZCC_Virtual = 1 << 13,
ZCC_Override = 1 << 14,
ZCC_Transient = 1 << 15,
};
// Function parameter modifiers
@ -104,6 +105,7 @@ enum EZCCTreeNodeType
AST_DeclFlags,
AST_ClassCast,
AST_StaticArrayStatement,
AST_Property,
NUM_AST_NODE_TYPES
};
@ -189,6 +191,11 @@ struct ZCC_Struct : ZCC_NamedNode
PStruct *Type;
};
struct ZCC_Property : ZCC_NamedNode
{
ZCC_TreeNode *Body;
};
struct ZCC_Class : ZCC_Struct
{
ZCC_Identifier *ParentName;