for (unsigned i(0); i != indent_; ++i)
out_ << " ";
else goto done;
- else goto work;
+ else if (rhs == '\r') {
+ if (right_) {
+ out_ << '\n';
+ right_ = false;
+ goto mode;
+ }
+ } else goto work;
+ right_ = true;
+ mode:
mode_ = NoMode;
goto done;
work:
- if (mode_ == Terminated && rhs != '}')
+ if (mode_ == Terminated && rhs != '}') {
+ right_ = true;
out_ << ';';
+ }
if (rhs == ';') {
if (pretty_)
} else none:
mode_ = NoMode;
+ right_ = true;
out_ << rhs;
done:
return *this;
else
mode_ = NoMode;
+ right_ = true;
out_ << rhs;
return *this;
}
} }
+void CYComment::Output(CYOutput &out, CYFlags flags) const {
+ out << '\r';
+ out << value_;
+ out << '\r';
+}
+
void CYCompound::Output(CYOutput &out, CYFlags flags) const {
if (CYExpression *expression = expressions_)
if (CYExpression *next = expression->next_) {