]> git.saurik.com Git - cycript.git/blobdiff - sig/parse.cpp
Started work on array comprehensions, implemented multi-line string literals (not...
[cycript.git] / sig / parse.cpp
index 1c0ec2339494bcfeb2f9be18b1ca476c976e8439..2f007de986ba67abc9d3c1f43e047162bca0b8fc 100644 (file)
@@ -118,7 +118,10 @@ struct Type *Parse_(apr_pool_t *pool, const char **name, char eos, bool named, C
         case '#': type->primitive = typename_P; break;
 
         case '(':
-            type->primitive = union_P;
+            if (type->data.signature.count < 2)
+                type->primitive = struct_P;
+            else
+                type->primitive = union_P;
             next = ')';
         goto aggregate;
 
@@ -157,13 +160,13 @@ struct Type *Parse_(apr_pool_t *pool, const char **name, char eos, bool named, C
 
         case '^':
             type->primitive = pointer_P;
-            if (**name == 'v') {
-                type->data.data.type = NULL;
-                ++*name;
-            } else if (**name == '"') {
+            if (**name == '"') {
                 type->data.data.type = NULL;
             } else {
                 type->data.data.type = Parse_(pool, name, eos, named, callback);
+                sig::Type *&target(type->data.data.type);
+                if (target != NULL && target->primitive == void_P)
+                    target = NULL;
             }
         break;