]> git.saurik.com Git - cycript.git/commitdiff
Support typedef and @encode with a void specifier.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jan 2016 21:44:53 +0000 (13:44 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 3 Jan 2016 21:44:53 +0000 (13:44 -0800)
Parser.ypp.in

index c2f48cef30cbda4371a395e79e6a6d14877df18e..3423e0d4819167a1db7890c6eec19d007a22d15d 100644 (file)
@@ -2145,11 +2145,13 @@ TypedIdentifierField
 TypedIdentifierEncoding
     : TypedIdentifierNo[pass] { $$ = $pass; }
     | TypeQualifierLeftOpt[modifier] "struct" "{" StructFieldListOpt[fields] "}" TypeQualifierRightOpt[typed] { if ($typed->identifier_ != NULL) CYERR($typed->location_, "unexpected identifier"); $$ = $typed; $$->specifier_ = CYNew CYTypeStruct(NULL, CYNew CYStructTail($fields)); CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
+    | "void" TypeSignifierNone[typed] { $$ = $typed; $$->specifier_ = CYNew CYTypeVoid(); }
     ;
 
 TypedIdentifierDefinition
     : TypedIdentifierYes[pass] { $$ = $pass; }
     | TypeQualifierLeftOpt[modifier] "struct" IdentifierTypeOpt[name] "{" StructFieldListOpt[fields] "}" TypeQualifierRightOpt[typed] { if ($typed->identifier_ == NULL) CYERR($typed->location_, "expected identifier"); $$ = $typed; $$->specifier_ = CYNew CYTypeStruct($name, CYNew CYStructTail($fields)); CYSetLast($modifier) = $$->modifier_; $$->modifier_ = $modifier; }
+    | "void" TypeSignifier[typed] { $$ = $typed; $$->specifier_ = CYNew CYTypeVoid(); }
     ;
 
 PrimaryExpression