Introduce "pre" and "post" asserts.

This commit is contained in:
Nigel Tao committed 2017-05-14 11:27:46 +10:00
1 parent dd06f67f7a
commit 1d3ae23418
7 files changed
+120 -44

No files matched your search

+1 -1
View File
@@ -88,7 +88,7 @@ func Render(w io.Writer, m *token.IDMap, src []token.Token, comments []string) (
indentAdjustment := 0
if lineTokens[0].ID.IsClose() {
indentAdjustment--
} else if hanging {
} else if hanging && lineTokens[0].ID != token.IDOpenCurly {
indentAdjustment++
}
buf = appendTabs(buf, indent+indentAdjustment)