]> git.draconx.ca Git - cdecl99.git/blobdiff - src/cdecl.h
Add support for array declarators.
[cdecl99.git] / src / cdecl.h
index 6055ea84a37858856214795fc59ee74cc6c7e7d8..9c06b799c261a674df2301f9f26ab2055006cf32 100644 (file)
@@ -2,6 +2,7 @@
 #define CEDCL_H_
 
 #include <stddef.h>
+#include <stdint.h>
 
 /* Declaration specifier kinds. */
 enum {
@@ -42,6 +43,7 @@ enum {
 enum {
        CDECL_DECL_IDENT,
        CDECL_DECL_POINTER,
+       CDECL_DECL_ARRAY,
 };
 
 struct cdecl {
@@ -60,6 +62,11 @@ struct cdecl {
                                struct cdecl_declspec   *qualifiers;
                                struct cdecl_declarator *declarator;
                        } pointer;
+                       struct cdecl_array {
+                               char *vla;
+                               uintmax_t length;
+                               struct cdecl_declarator *declarator;
+                       } array;
                } u;
        } *declarators;
 };