+void CYTypeConstant::Output(CYOutput &out, CYIdentifier *identifier) const {
+ out << "const";
+ next_->Output(out, Precedence(), identifier, false);
+}
+
+void CYTypeFunctionWith::Output(CYOutput &out, CYIdentifier *identifier) const {
+ next_->Output(out, Precedence(), identifier, false);
+ out << '(' << parameters_;
+ if (variadic_) {
+ if (parameters_ != NULL)
+ out << ',' << ' ';
+ out << "...";
+ }
+ out << ')';
+}
+
+void CYTypePointerTo::Output(CYOutput &out, CYIdentifier *identifier) const {
+ out << '*';
+ next_->Output(out, Precedence(), identifier, false);
+}
+
+void CYTypeVolatile::Output(CYOutput &out, CYIdentifier *identifier) const {
+ out << "volatile";
+ next_->Output(out, Precedence(), identifier, true);
+}
+
+void CYTypeModifier::Output(CYOutput &out, int precedence, CYIdentifier *identifier, bool space) const {
+ if (this == NULL && identifier == NULL)
+ return;
+ else if (space)
+ out << ' ';
+
+ if (this == NULL) {
+ out << identifier;
+ return;
+ }
+
+ bool protect(precedence > Precedence());
+
+ if (protect)
+ out << '(';
+ Output(out, identifier);
+ if (protect)
+ out << ')';
+}
+
+void CYTypedIdentifier::Output(CYOutput &out) const {
+ specifier_->Output(out);
+ modifier_->Output(out, 0, identifier_, true);
+}
+
+void CYEncodedType::Output(CYOutput &out, CYFlags flags) const {
+ out << "@encode(" << typed_ << ")";
+}
+
+void CYTypedParameter::Output(CYOutput &out) const {
+ out << typed_;
+ if (next_ != NULL)
+ out << ',' << ' ' << next_;
+}
+
+void CYLambda::Output(CYOutput &out, CYFlags flags) const {
+ // XXX: this is seriously wrong
+ out << "[](";
+ out << ")->";
+ out << "{";
+ out << "}";
+}
+
+void CYTypeDefinition::Output(CYOutput &out, CYFlags flags) const {
+ out << "typedef" << ' ' << *typed_;
+ out.Terminate();
+}
+
+void CYTypeExpression::Output(CYOutput &out, CYFlags flags) const {
+ out << '(' << "typedef" << ' ' << *typed_ << ')';
+}
+
+void CYLexical::Output(CYOutput &out, CYFlags flags) const {
+ out << "let" << ' ';
+ bindings_->Output(out, flags); // XXX: flags
+ out << ';';
+}
+
+void CYModule::Output(CYOutput &out) const {
+ out << part_;
+ if (next_ != NULL)
+ out << '.' << next_;