X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/aa82b83bc1cf1a31523f5ca3e3c7e44b34c8d72c..f53b3728f410baac87f286b5345aeb18cc8b8d17:/Cycript.yy.in diff --git a/Cycript.yy.in b/Cycript.yy.in index d049537..684463d 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -481,6 +481,7 @@ int cylex(YYSTYPE *, cy::location *, void *); %type MessageScope %type ModifiedType %type PrefixedType +%type PrimitiveType %type QualifiedType %type SelectorCall_ %type SelectorCall @@ -1357,8 +1358,13 @@ PrefixedType | "*" PrefixedType { CYSetLast($2->type_) = CYNew CYTypePointerTo(); $$ = $2; } ; +PrimitiveType + : Variable { $$ = $1; } + | "void" { $$ = CYNew cy::Syntax::New(CYNew CYVariable(CYNew CYIdentifier("Type")), CYNew CYArgument(CYNew CYString("v"))); } + ; + QualifiedType - : Variable { $$ = CYNew CYTypeVariable($1); } + : PrimitiveType { $$ = CYNew CYTypeVariable($1); } | "const" QualifiedType { $$ = CYNew CYTypeConstant($2); } ; @@ -1403,7 +1409,6 @@ MessageScope TypeOpt : "(" LexSetRegExp EncodedType ")" { $$ = $3; } - | "(" LexSetRegExp "void" ")" { $$ = CYNew CYString("v"); } | { $$ = NULL; } ;