-void CYFunction::Output(CYOutput &out) const {
- CYLambda::Output(out, CYNoFlags);
+void CYFunction::Output(CYOutput &out, CYFlags flags) const {
+ bool protect((flags & CYNoFunction) != 0);
+ if (protect)
+ out << '(';
+ else if ((flags & CYNoLeader) != 0)
+ out << ' ';
+ out << "function";
+ if (name_ != NULL)
+ out << ' ' << *name_;
+ out << '(';
+ if (parameters_ != NULL)
+ out << *parameters_;
+ out << "){";
+ if (body_ != NULL)
+ body_->Multiple(out);
+ out << '}';
+ if (protect)
+ out << ')';
+}
+
+void CYFunctionExpression::Output(CYOutput &out, CYFlags flags) const {
+ CYFunction::Output(out, flags);
+}
+
+void CYFunctionStatement::Output(CYOutput &out, CYFlags flags) const {
+ CYFunction::Output(out, flags);