[bugfix] fix #11469, new rules for a newline in nimpretty (#11512)

* [bugfix] fix #11469, new rules for a newline in nimpretty
* concatenate two lines if they have the same indentation level
This commit is contained in:
Miran 2019-06-26 15:36:44 +02:00 • committed by Andreas Rumpf
commit f288e1b11a
7 changed files with 112 additions and 72 deletions

View file

@ -904,6 +904,7 @@ proc parsePragma(p: var TParser): PNode =
result = newNodeP(nkPragma, p)
inc p.inPragma
when defined(nimpretty):
inc p.em.doIndentMore
inc p.em.keepIndents
getTok(p)
optInd(p, result)
@ -924,6 +925,7 @@ proc parsePragma(p: var TParser): PNode =
parMessage(p, "expected '.}'")
dec p.inPragma
when defined(nimpretty):
dec p.em.doIndentMore
dec p.em.keepIndents
proc identVis(p: var TParser; allowDot=false): PNode =