-void CYMessage::Output(std::ostream &out, bool replace) const {
- if (next_ != NULL)
- next_->Output(out, replace);
- out << "$cyn=new Selector(\"";
- for (CYMessageParameter *parameter(parameter_); parameter != NULL; parameter = parameter->next_)
- if (parameter->tag_ != NULL) {
- out << *parameter->tag_;
- if (parameter->name_ != NULL)
- out << ':';
- }
- out << "\");";
- out << "$cyt=$cyn.type($cy" << (instance_ ? 's' : 'p') << ");";
- out << "class_" << (replace ? "replace" : "add") << "Method($cy" << (instance_ ? 'c' : 'm') << ",$cyn,";
- out << "new Functor(function(self,_cmd";
- for (CYMessageParameter *parameter(parameter_); parameter != NULL; parameter = parameter->next_)
- if (parameter->name_ != NULL)
- out << ',' << *parameter->name_;
- out << "){return function(){";
- if (body_ != NULL)
- body_->Show(out);
- out << "}.call(self);},$cyt),$cyt);";
-}
-
-void CYNew::Output(std::ostream &out, CYFlags flags) const {
- if ((flags & CYNoLeader) != 0)
- out << ' ';
- out << "new";
- constructor_->Output(out, Precedence(), CYCenter(flags) | CYNoLeader);
- out << '(';
+void CYLetStatement::Output(CYOutput &out, CYFlags flags) const {
+ out << "let" << ' ' << '(' << *declarations_ << ')';
+ code_->Single(out, CYRight(flags));
+}
+
+namespace cy {
+namespace Syntax {
+
+void New::Output(CYOutput &out, CYFlags flags) const {
+ out << "new" << ' ';
+ CYFlags jacks(CYNoCall | CYCenter(flags));
+ constructor_->Output(out, Precedence(), jacks);