]> git.saurik.com Git - cycript.git/blobdiff - Output.cpp
De-CYNext CYExpression, fix CYCompound/Primitive.
[cycript.git] / Output.cpp
index 9b9bc72b222e7f0d5b2257382fd829980af9b7c5..602251460b6f80e7e5b63ed0a4c5237818a86145 100644 (file)
@@ -194,19 +194,13 @@ void CYComment::Output(CYOutput &out, CYFlags flags) const {
 }
 
 void CYCompound::Output(CYOutput &out, CYFlags flags) const {
-    if (CYExpression *expression = expressions_)
-        if (CYExpression *next = expression->next_) {
-            expression->Output(out, CYLeft(flags));
-            CYFlags center(CYCenter(flags));
-            while (next != NULL) {
-                expression = next;
-                out << ',' << ' ';
-                next = expression->next_;
-                CYFlags right(next != NULL ? center : CYRight(flags));
-                expression->Output(out, right);
-            }
-        } else
-            expression->Output(out, flags);
+    if (next_ == NULL)
+        expression_->Output(out, flags);
+    else {
+        expression_->Output(out, CYLeft(flags));
+        out << ',' << ' ';
+        next_->Output(out, CYRight(flags));
+    }
 }
 
 void CYCondition::Output(CYOutput &out, CYFlags flags) const {