Skip to content

Commit eb9d058

Browse files
committed
comment
1 parent ca87feb commit eb9d058

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/phrenderer.nim

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,6 +1537,9 @@ proc gsub(g: var TOutput, n: PNode, flags: SubFlags, extra: int) =
15371537

15381538
gsub(g, n[0], nameFlags)
15391539

1540+
# The way stacked calls work, the `.name` part will be indented when on a
1541+
# new line by the nkDotExpr handler - when that happens, we must also
1542+
# indent the list of parameters
15401543
let ind = g.condIndent(stackDot, flagIndent(flags))
15411544
glist(g, n, tkParLe, start = 1, flags = {lfLongSepAtEnd})
15421545
g.dedent(ind)
@@ -1681,6 +1684,8 @@ proc gsub(g: var TOutput, n: PNode, flags: SubFlags, extra: int) =
16811684
gmids(g, n)
16821685
elif stackNL:
16831686
optNL(g)
1687+
1688+
# Careful, this indent must be matched for the parameter list in nkCall!
16841689
g.optIndent(wid)
16851690
put(g, tkDot, ".")
16861691
gsub(g, n[1], {sfNoIndent})

0 commit comments

Comments
 (0)