-#define ALLOC_STRUCT(ptr, type, ...) do { \
- ALLOC(ptr, sizeof (type)); \
- *(ptr) = (type) { __VA_ARGS__ }; \
+#define ALLOC_FUNCTION(ptr, parameters_, variadic_) do { \
+ ALLOC_FUNCTION_(ptr, parameters_); \
+ (ptr)->u.function.variadic = variadic_; \
+} while (0)
+
+#define ALLOC_ARRAY(ptr, length_) do { \
+ ALLOC_ITEM_DECLARATOR(ptr); \
+ (ptr)->type = CDECL_DECL_ARRAY; \
+ (ptr)->u.array.vla = NULL; \
+ (ptr)->u.array.length = length_; \
+} while (0)
+
+#define ALLOC_POINTER(ptr, qualifiers_, child_) do { \
+ ALLOC_ITEM_DECLARATOR(ptr); \
+ (ptr)->child = child_; \
+ (ptr)->type = CDECL_DECL_POINTER; \
+ (ptr)->u.pointer.qualifiers = qualifiers_; \
+} while (0)
+
+#define ALLOC_DECLSPEC(ptr, type_) do { \
+ ALLOC_ITEM_DECLSPEC(ptr); \
+ (ptr)->type = type_; \
+ (ptr)->ident = NULL; \
+} while (0)
+
+#define ALLOC_DECL(ptr, specifiers_, declarators_) do { \
+ ALLOC_ITEM_DECL(ptr); \
+ (ptr)->specifiers = specifiers_; \
+ (ptr)->declarators = declarators_; \