projects
/
cycript.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0fa0e7f
)
Improve the pretty-printing of else clauses.
author
Jay Freeman (saurik)
<saurik@saurik.com>
Mon, 19 Mar 2012 00:09:42 +0000
(
00:09
+0000)
committer
Jay Freeman (saurik)
<saurik@saurik.com>
Mon, 19 Mar 2012 00:09:42 +0000
(
00:09
+0000)
Output.cpp
patch
|
blob
|
blame
|
history
diff --git
a/Output.cpp
b/Output.cpp
index ee58d06ecc8608da559df22e6839198538fef6ff..e399d4807bc7aaef4145364f872a4abef07cae03 100644
(file)
--- a/
Output.cpp
+++ b/
Output.cpp
@@
-378,8
+378,12
@@
void CYFor::Output(CYOutput &out, CYFlags flags) const {
if (initialiser_ != NULL)
initialiser_->For(out);
out.Terminate();
if (initialiser_ != NULL)
initialiser_->For(out);
out.Terminate();
+ if (test_ != NULL)
+ out << ' ';
out << test_;
out.Terminate();
out << test_;
out.Terminate();
+ if (increment_ != NULL)
+ out << ' ';
out << increment_;
out << ')';
code_->Single(out, CYRight(flags));
out << increment_;
out << ')';
code_->Single(out, CYRight(flags));
@@
-460,7
+464,7
@@
void CYIf::Output(CYOutput &out, CYFlags flags) const {
true_->Single(out, jacks);
if (false_ != NULL) {
true_->Single(out, jacks);
if (false_ != NULL) {
- out << "else";
+ out <<
'\t' <<
"else";
false_->Single(out, right);
}
false_->Single(out, right);
}