Remove unnecessary {}s.

This commit is contained in:
Nigel Tao committed 2017-08-26 17:30:04 +10:00
1 parent 018d8d1893
commit b328529e00
2 files changed
+226 -236

No files matched your search

+4 -12
View File
@@ -97,20 +97,12 @@ func (g *gen) writeFuncImpl(b *buffer, n *a.Func) error {
}
b.writes("{\n")
b.writex(k.bHeader)
if k.suspendible {
if k.coroSuspPoint > 0 {
b.writex(k.bBodyResume)
} else {
b.writes("{\n")
}
if k.suspendible && k.coroSuspPoint > 0 {
b.writex(k.bBodyResume)
}
b.writex(k.bBody)
if k.suspendible {
if k.coroSuspPoint > 0 {
b.writex(k.bBodySuspend)
} else {
b.writes("}\n")
}
if k.suspendible && k.coroSuspPoint > 0 {
b.writex(k.bBodySuspend)
}
b.writex(k.bFooter)
b.writes("}\n\n")