]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Replace.cpp
Remove Makefile.in from .gitignore (forgot that).
[cycript.git] / ObjectiveC / Replace.cpp
index 96f66630fecea261f3667ea76e45d22fb3b6a39a..11262318e4f98972e0748747cb14984e515e4531 100644 (file)
@@ -79,7 +79,7 @@ CYStatement *CYClassStatement::Replace(CYContext &context) {
 }
 
 CYExpression *CYTypeArrayOf::Replace(CYContext &context) {
-    return $ CYCall($ CYDirectMember(next_->Replace(context), $ CYString("arrayOf")), $ CYArgument($ CYNumber(size_)));
+    return $ CYCall($ CYDirectMember(next_->Replace(context), $ CYString("arrayOf")), $ CYArgument(size_));
 }
 
 CYExpression *CYTypeConstant::Replace(CYContext &context) {
@@ -167,7 +167,7 @@ CYExpression *CYBox::Replace(CYContext &context) {
 }
 
 CYExpression *CYObjCBlock::Replace(CYContext &context) {
-    return $N2($V("Functor"), $ CYFunctionExpression(NULL, parameters_->Parameters(context), statements_), parameters_->TypeSignature(context, type_->Replace(context)));
+    return $N2($V("Functor"), $ CYFunctionExpression(NULL, $ CYFunctionParameter($ CYDeclaration($ CYIdentifier("$cyt")), parameters_->Parameters(context)), statements_), parameters_->TypeSignature(context, $ CYAdd(type_->Replace(context), $ CYString("@"))));
 }
 
 CYStatement *CYProtocol::Replace(CYContext &context) const { $T(NULL)
@@ -224,7 +224,7 @@ CYExpression *CYSendSuper::Replace(CYContext &context) {
 }
 
 CYFunctionParameter *CYTypedParameter::Parameters(CYContext &context) { $T(NULL)
-    return $ CYFunctionParameter($ CYDeclaration(typed_->identifier_), next_->Parameters(context));
+    return $ CYFunctionParameter($ CYDeclaration(typed_->identifier_ ?: context.Unique()), next_->Parameters(context));
 }
 
 CYExpression *CYTypedParameter::TypeSignature(CYContext &context, CYExpression *prefix) { $T(prefix)