}
void CYImplementationField::Output(CYOutput &out) const {
+ out << *typed_;
+ out.Terminate();
+ out << '\n';
}
void CYInstanceLiteral::Output(CYOutput &out, CYFlags flags) const {
value_->Output(out, Precedence(), CYRight(flags));
}
+void CYObjCArray::Output(CYOutput &out, CYFlags flags) const {
+ out << '@' << '[' << elements_ << ']';
+}
+
+void CYObjCDictionary::Output(CYOutput &out, CYFlags flags) const {
+ out << '@' << '{' << '}';
+}
+
void CYObjCBlock::Output(CYOutput &out, CYFlags flags) const {
- // XXX: this is seriously wrong
- out << "^(";
- out << ")";
- out << "{";
- out << "}";
+ out << '^' << ' ' << *typed_ << ' ' << '(';
+
+ bool comma(false);
+ CYForEach (parameter, parameters_) {
+ if (comma)
+ out << ',' << ' ';
+ else
+ comma = true;
+ out << *parameter->typed_;
+ }
+
+ out << ')' << ' ' << '{' << '\n';
+ ++out.indent_;
+ out << code_;
+ --out.indent_;
+ out << '\n' << '}';
}
void CYProtocol::Output(CYOutput &out) const {