diff options
-rw-r--r-- | compiler/layouter.nim | 3 | ||||
-rw-r--r-- | nimpretty/tests/exhaustive.nim | 4 | ||||
-rw-r--r-- | nimpretty/tests/expected/exhaustive.nim | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/compiler/layouter.nim b/compiler/layouter.nim index c603c16ff..ec9db6aad 100644 --- a/compiler/layouter.nim +++ b/compiler/layouter.nim @@ -514,7 +514,8 @@ proc emitTok*(em: var Emitter; L: Lexer; tok: Token) = (not em.wasExportMarker or tok.tokType == tkCurlyDotLe): wrSpace em wr(em, $tok.tokType, ltSomeParLe) - rememberSplit(splitParLe) + if tok.tokType != tkCurlyDotLe: + rememberSplit(splitParLe) of closedPars: wr(em, $tok.tokType, ltSomeParRi) of tkColonColon: diff --git a/nimpretty/tests/exhaustive.nim b/nimpretty/tests/exhaustive.nim index 83f4f04c3..30cfc47a9 100644 --- a/nimpretty/tests/exhaustive.nim +++ b/nimpretty/tests/exhaustive.nim @@ -843,3 +843,7 @@ type SpinnyEvent2 = tuple kind: EventKind payload: string + + +proc hid_open*(vendor_id: cushort; product_id: cushort; serial_number: cstring): ptr HidDevice {. + importc: "hid_open", dynlib: hidapi.} diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim index 382722ea7..82927a11c 100644 --- a/nimpretty/tests/expected/exhaustive.nim +++ b/nimpretty/tests/expected/exhaustive.nim @@ -856,3 +856,8 @@ type SpinnyEvent2 = tuple kind: EventKind payload: string + + +proc hid_open*(vendor_id: cushort; product_id: cushort; + serial_number: cstring): ptr HidDevice {. + importc: "hid_open", dynlib: hidapi.} |