]> git.saurik.com Git - cycript.git/blobdiff - ObjectiveC/Output.cpp
Correct prototype hierearchy (simple AND elegant).
[cycript.git] / ObjectiveC / Output.cpp
index e2bb0f8e618c0e8ebdab28c028234fbcad2c8239..6927938200db773981b2228b892ae4df3b752093 100644 (file)
@@ -49,7 +49,7 @@ void CYImplementation::Output(CYOutput &out, CYFlags flags) const {
 }
 
 void CYImplementationField::Output(CYOutput &out) const {
-    out << *typed_;
+    type_->Output(out, name_);
     out.Terminate();
     out << '\n';
 }
@@ -65,8 +65,13 @@ void CYMessage::Output(CYOutput &out) const {
     CYForEach (parameter, parameters_)
         if (parameter->name_ != NULL) {
             out << ' ' << *parameter->name_;
-            if (parameter->type_ != NULL)
-                out << ':' << *parameter->type_->identifier_;
+            // XXX: this is off somehow
+            if (parameter->identifier_ != NULL) {
+                out << ':';
+                if (parameter->type_ != NULL)
+                    out << '(' << *parameter->type_ << ')';
+                out << *parameter->identifier_;
+            }
         }
 
     out << code_;
@@ -133,7 +138,7 @@ void CYObjCBlock::Output(CYOutput &out, CYFlags flags) const {
             out << ',' << ' ';
         else
             comma = true;
-        out << *parameter->typed_;
+        parameter->type_->Output(out, parameter->name_);
     }
 
     out << ')' << ' ' << '{' << '\n';