/** * Write the case out to the stream. * * @param out -- The output stream to write the if to. */ void Case_::Write_(Printer& out) const { out.Indent(); out.IgnoreNextIndent(); out << "(case " << this->condition.ToString() << "\n"; { Printer::TabMarker tab = out.Tab(); } out.Indent(); out << ')'; }
/** * Write the if out to the stream. * * @param out -- The output stream to write the if to. */ void If_::Write_(Printer& out) const { out.Indent(); out << "(if\n" ; { Printer::TabMarker tab = out.Tab(); this->condition.Write(out); out << '\n'; this->true_result.Write(out); out << '\n'; this->false_result.Write(out); out << '\n'; } out.Indent(); out << ')'; }
/** * Write the set out to the stream. * * @param out -- The output stream to write the set to. */ void Set_::Write_(Printer& out) const { out.Indent(); out << "(set " << this->id << ' '; if (this->global) { out << "~>\n"; } else { out << "->\n"; } { Printer::TabMarker marker = out.Tab(); this->element.Write(out); out << '\n'; } out.Indent(); out << ')'; }
/** * Write the set out to the stream. * * @param out -- The output stream to write the set to. */ void Function_::Write_(Printer& out) const { out.Indent(); out << "(function ( "; size_t const NUMBER_OF_ARGS = this->args.size(); for(size_t i=0; i<NUMBER_OF_ARGS; ++i) { out.IgnoreNextIndent(); out << this->args[i].ToString() << ' '; } out << ")\n"; { Printer::TabMarker tab = out.Tab(); this->body.Write(out); out << '\n'; } out.Indent(); out << ')'; }