nimpretty: fixes #9500
This commit is contained in:
parent
0afca3dd6b
commit
87d60b2a4b
3 changed files with 47 additions and 0 deletions
|
|
@ -1144,6 +1144,7 @@ proc skip(L: var TLexer, tok: var TToken) =
|
||||||
hasComment = true
|
hasComment = true
|
||||||
if tok.line < 0:
|
if tok.line < 0:
|
||||||
tok.line = L.lineNumber
|
tok.line = L.lineNumber
|
||||||
|
commentIndent = indent
|
||||||
skipMultiLineComment(L, tok, pos+2, false)
|
skipMultiLineComment(L, tok, pos+2, false)
|
||||||
pos = L.bufpos
|
pos = L.bufpos
|
||||||
buf = L.buf
|
buf = L.buf
|
||||||
|
|
|
||||||
|
|
@ -334,3 +334,26 @@ proc abcdef*[T:not (tuple|object|string|cstring|char|ref|ptr|array|seq|distinct)
|
||||||
# bug #9504
|
# bug #9504
|
||||||
type T2 = a.type
|
type T2 = a.type
|
||||||
discard
|
discard
|
||||||
|
|
||||||
|
proc fun() =
|
||||||
|
#[
|
||||||
|
this one here
|
||||||
|
]#
|
||||||
|
discard
|
||||||
|
|
||||||
|
proc fun2() =
|
||||||
|
##[
|
||||||
|
foobar
|
||||||
|
]##
|
||||||
|
discard
|
||||||
|
|
||||||
|
#[
|
||||||
|
foobar
|
||||||
|
]#
|
||||||
|
|
||||||
|
proc fun3() =
|
||||||
|
discard
|
||||||
|
|
||||||
|
##[
|
||||||
|
foobar
|
||||||
|
]##
|
||||||
|
|
|
||||||
|
|
@ -343,3 +343,26 @@ proc abcdef*[T: not (tuple|object|string|cstring|char|ref|ptr|array|seq|distinct
|
||||||
# bug #9504
|
# bug #9504
|
||||||
type T2 = a.type
|
type T2 = a.type
|
||||||
discard
|
discard
|
||||||
|
|
||||||
|
proc fun() =
|
||||||
|
#[
|
||||||
|
this one here
|
||||||
|
]#
|
||||||
|
discard
|
||||||
|
|
||||||
|
proc fun2() =
|
||||||
|
##[
|
||||||
|
foobar
|
||||||
|
]##
|
||||||
|
discard
|
||||||
|
|
||||||
|
#[
|
||||||
|
foobar
|
||||||
|
]#
|
||||||
|
|
||||||
|
proc fun3() =
|
||||||
|
discard
|
||||||
|
|
||||||
|
##[
|
||||||
|
foobar
|
||||||
|
]##
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue