}
void CYImplementationField::Output(CYOutput &out) const {
- out << *typed_;
+ type_->Output(out, name_);
out.Terminate();
out << '\n';
}
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_;
}
void CYObjCDictionary::Output(CYOutput &out, CYFlags flags) const {
- out << '@' << '{' << '}';
+ unsigned count(0);
+ CYForEach (pair, pairs_)
+ ++count;
+ bool large(count > 8);
+
+ out << '@' << '{';
+ if (large) {
+ out << '\n';
+ ++out.indent_;
+ }
+
+ bool comma(false);
+ CYForEach (pair, pairs_) {
+ if (!comma)
+ comma = true;
+ else {
+ out << ',';
+ if (large)
+ out << '\n';
+ else
+ out << ' ';
+ }
+
+ if (large)
+ out << '\t';
+
+ pair->key_->Output(out, CYAssign::Precedence_, CYNoFlags);
+ out << ':' << ' ';
+ pair->value_->Output(out, CYAssign::Precedence_, CYNoFlags);
+ }
+
+ if (large && out.pretty_)
+ out << ',';
+
+ if (large) {
+ out << '\n';
+ --out.indent_;
+ }
+
+ out << '\t' << '}';
}
void CYObjCBlock::Output(CYOutput &out, CYFlags flags) const {
out << ',' << ' ';
else
comma = true;
- out << *parameter->typed_;
+ parameter->type_->Output(out, parameter->name_);
}
out << ')' << ' ' << '{' << '\n';
++out.indent_;
out << code_;
--out.indent_;
- out << '\n' << '}';
+ out << '\t' << '}';
}
void CYProtocol::Output(CYOutput &out) const {