* [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:
parent
0a81b038fd
commit
f288e1b11a
7 changed files with 112 additions and 72 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue