nimpretty: fixes #8626

This commit is contained in:
Andreas Rumpf 2018-10-16 15:33:21 +02:00
commit ed38079b9b
5 changed files with 22 additions and 3 deletions

View file

@ -1037,6 +1037,7 @@ proc parseParamList(p: var TParser, retColon = true): PNode =
addSon(result, p.emptyNode) # return type
when defined(nimpretty2):
inc p.em.doIndentMore
inc p.em.inParamList
let hasParLe = p.tok.tokType == tkParLe and p.tok.indent < 0
if hasParLe:
getTok(p)
@ -1073,6 +1074,7 @@ proc parseParamList(p: var TParser, retColon = true): PNode =
result = p.emptyNode
when defined(nimpretty2):
dec p.em.doIndentMore
dec p.em.inParamList
proc optPragmas(p: var TParser): PNode =
if p.tok.tokType == tkCurlyDotLe and (p.tok.indent < 0 or realInd(p)):