nimpretty: fixes #9673 [backport]
This commit is contained in:
parent
c0b5479e6b
commit
532647171e
3 changed files with 7 additions and 1 deletions
|
|
@ -245,7 +245,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) =
|
||||||
wr(TokTypeToStr[tok.tokType])
|
wr(TokTypeToStr[tok.tokType])
|
||||||
if not em.inquote: wr(" ")
|
if not em.inquote: wr(" ")
|
||||||
of tkOpr, tkDotDot:
|
of tkOpr, tkDotDot:
|
||||||
if tok.strongSpaceA == 0 and tok.strongSpaceB == 0:
|
if (tok.strongSpaceA == 0 and tok.strongSpaceB == 0) or em.inquote:
|
||||||
# bug #9504: remember to not spacify a keyword:
|
# bug #9504: remember to not spacify a keyword:
|
||||||
lastTokWasTerse = true
|
lastTokWasTerse = true
|
||||||
# if not surrounded by whitespace, don't produce any whitespace either:
|
# if not surrounded by whitespace, don't produce any whitespace either:
|
||||||
|
|
|
||||||
|
|
@ -357,3 +357,6 @@ proc fun3() =
|
||||||
##[
|
##[
|
||||||
foobar
|
foobar
|
||||||
]##
|
]##
|
||||||
|
|
||||||
|
# bug #9673
|
||||||
|
discard `* `(1, 2)
|
||||||
|
|
|
||||||
|
|
@ -366,3 +366,6 @@ proc fun3() =
|
||||||
##[
|
##[
|
||||||
foobar
|
foobar
|
||||||
]##
|
]##
|
||||||
|
|
||||||
|
# bug #9673
|
||||||
|
discard `*`(1, 2)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue