nimpretty: fixes #9500

(cherry picked from commit 87d60b2a4b)
This commit is contained in:
Araq
2018-10-25 11:48:06 +02:00
committed by narimiran
parent 6977a743f3
commit c53046223f
3 changed files with 47 additions and 0 deletions

View File

@@ -1096,6 +1096,7 @@ proc skip(L: var TLexer, tok: var TToken) =
hasComment = true
if tok.line < 0:
tok.line = L.lineNumber
commentIndent = indent
skipMultiLineComment(L, tok, pos+2, false)
pos = L.bufpos
buf = L.buf

View File

@@ -334,3 +334,26 @@ proc abcdef*[T:not (tuple|object|string|cstring|char|ref|ptr|array|seq|distinct)
# bug #9504
type T2 = a.type
discard
proc fun() =
#[
this one here
]#
discard
proc fun2() =
##[
foobar
]##
discard
#[
foobar
]#
proc fun3() =
discard
##[
foobar
]##

View File

@@ -343,3 +343,26 @@ proc abcdef*[T: not (tuple|object|string|cstring|char|ref|ptr|array|seq|distinct
# bug #9504
type T2 = a.type
discard
proc fun() =
#[
this one here
]#
discard
proc fun2() =
##[
foobar
]##
discard
#[
foobar
]#
proc fun3() =
discard
##[
foobar
]##