rhs_->Output(out, Precedence(), CYRight(flags));
}
+void CYBlock::Output(std::ostream &out) const {
+ for (CYSource *statement(statements_); statement != NULL; statement = statement->next_)
+ statement->Output(out);
+}
+
void CYBoolean::Output(std::ostream &out, CYFlags flags) const {
if ((flags & CYNoLeader) != 0)
out << ' ';
void CYSource::Show(std::ostream &out) const {
for (const CYSource *next(this); next != NULL; next = next->next_)
- next->Output(out);
+ next->Output_(out);
}
void CYSource::Output(std::ostream &out, bool block) const {
- if (!block && next_ == NULL)
+ if (!block && !IsBlock())
Output(out);
else {
out << '{';
}
}
+void CYSource::Output_(std::ostream &out) const {
+ Output(out);
+}
+
+void CYStatement::Output_(std::ostream &out) const {
+ for (CYLabel *label(labels_); label != NULL; label = label->next_)
+ out << *label->name_ << ':';
+ Output(out);
+}
+
void CYString::Output(std::ostream &out, CYFlags flags) const {
unsigned quot(0), apos(0);
for (const char *value(value_), *end(value_ + size_); value != end; ++value)