]> git.draconx.ca Git - cdecl99.git/blobdiff - src/cdecl-internal.h
libcdecl: Combine identifier and struct allocation.
[cdecl99.git] / src / cdecl-internal.h
index a5f3272298a20aeb3422ce685849cf223f0ee730..cae248bc899c38330510d9433a8bd2ceb79eb15b 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <stddef.h>
 #include <gettext.h>
+#include "cdecl.h"
 
 #define _(s) dgettext(PACKAGE, s)
 #define N_(s) s
@@ -100,4 +101,16 @@ const char *cdecl__emit_specs(struct output_state *dst,
  */
 unsigned cdecl__to_keyword(const char *s, int len, int english_mode);
 
+/* Container for an allocated parser token's value */
+struct parse_item {
+       union {
+               struct cdecl_declarator declarator;
+               struct cdecl_declspec   declspec;
+       } u;
+
+       char s[FLEXIBLE_ARRAY_MEMBER];
+};
+
+struct parse_item *cdecl__alloc_item(size_t s_sz);
+
 #endif