lex: add void type
authorAlan Cox <alan@linux.intel.com>
Fri, 24 Jun 2016 16:59:05 +0000 (17:59 +0100)
committerAlan Cox <alan@linux.intel.com>
Fri, 24 Jun 2016 16:59:05 +0000 (17:59 +0100)
Applications/SmallC/lex.c

index a79aa82..0f14b06 100644 (file)
@@ -197,8 +197,13 @@ void blanks(void) {
 /**
  * returns declaration type
  * @return CCHAR, CINT, UCHAR, UINT
+ *
+ * FIXME: wants rewriting to collect property bits and base type right
  */
 int get_type(void) {
+    if (amatch ("void", 4)) {
+        return VOID;
+    }
     if (amatch ("register", 8)) {
         if (amatch("char", 4))
             return CCHAR;