+void CYForInComprehension::Output(CYOutput &out) const {
+ out << "for" << ' ' << '(';
+ declaration_->Output(out, CYNoIn | CYNoRightHand);
+ out << ' ' << "in" << ' ' << *set_ << ')';
+}
+
+void CYForOf::Output(CYOutput &out, CYFlags flags) const {
+ out << "for" << ' ' << '(';
+ initialiser_->Output(out, CYNoRightHand);
+ out << ' ' << "of" << ' ' << *set_ << ')';
+ code_->Single(out, CYRight(flags), CYCompactShort);
+}
+
+void CYForOfComprehension::Output(CYOutput &out) const {
+ out << "for" << ' ' << '(';
+ declaration_->Output(out, CYNoRightHand);
+ out << ' ' << "of" << ' ' << *set_ << ')' << next_;
+}
+
+void CYForVariable::Output(CYOutput &out, CYFlags flags) const {
+ out << "var" << ' ';
+ declaration_->Output(out, CYRight(flags));
+}
+
+void CYFunction::Output(CYOutput &out) const {
+ out << '(' << parameters_ << ')' << ' ';
+ out << '{' << '\n';
+ ++out.indent_;
+ out << code_;
+ --out.indent_;
+ out << '\t' << '}';
+}
+
+void CYFunctionExpression::Output(CYOutput &out, CYFlags flags) const {
+ // XXX: one could imagine using + here to save a byte
+ bool protect((flags & CYNoFunction) != 0);
+ if (protect)
+ out << '(';
+ out << "function";
+ if (name_ != NULL)
+ out << ' ' << *name_;
+ CYFunction::Output(out);
+ if (protect)
+ out << ')';
+}
+
+void CYFunctionStatement::Output(CYOutput &out, CYFlags flags) const {
+ out << "function" << ' ' << *name_;
+ CYFunction::Output(out);
+}
+
+void CYFunctionParameter::Output(CYOutput &out) const {
+ initialiser_->Output(out, CYNoFlags);
+ if (next_ != NULL)
+ out << ',' << ' ' << *next_;
+}
+
+const char *CYIdentifier::Word() const {
+ return next_ == NULL || next_ == this ? CYWord::Word() : next_->Word();
+}
+
+void CYIf::Output(CYOutput &out, CYFlags flags) const {
+ bool protect(false);
+ if (false_ == NULL && (flags & CYNoDangle) != 0) {
+ protect = true;
+ out << '{';
+ }
+
+ out << "if" << ' ' << '(' << *test_ << ')';
+
+ CYFlags right(protect ? CYNoFlags : CYRight(flags));
+
+ CYFlags jacks(CYNoDangle);
+ if (false_ == NULL)
+ jacks |= right;
+ else
+ jacks |= protect ? CYNoFlags : CYCenter(flags);
+
+ unsigned line(out.position_.line);
+ unsigned indent(out.indent_);
+ true_->Single(out, jacks, CYCompactShort);
+