- extended the grammar so that the DECORATE function declaration list can almost be used as-is, with the sole exception of requiring any action function to declare a return type, even if it is void.

This adds:
 * builtin types color, state and sound.
 * ending a parameter list with an ellipsis to declare a varargs list. (A_Jump uses this.)
 * allowing to declare optional arguments by giving them a default value.
 * adding an 'action' qualifier for function declarations.
This commit is contained in:
Christoph Oelckers 2016-10-11 13:11:40 +02:00
commit 6989b81688
5 changed files with 59 additions and 1 deletions

View file

@ -119,6 +119,11 @@ enum EZCCBuiltinType
ZCC_Vector3,
ZCC_Vector4,
ZCC_Name,
ZCC_Color, // special types for ZDoom.
ZCC_State,
ZCC_Sound,
ZCC_UserType,
ZCC_NUM_BUILT_IN_TYPES
@ -437,6 +442,7 @@ struct ZCC_LocalVarStmt : ZCC_Statement
struct ZCC_FuncParamDecl : ZCC_TreeNode
{
ZCC_Type *Type;
ZCC_Expression *Default;
ENamedName Name;
int Flags;
};