fix #12155, improve nimpretty's handling of pragmas (#17353)

This commit is contained in:
Miran
2021-03-12 15:34:42 +01:00
committed by GitHub
parent 686bf3bfc6
commit 4f0bac791a
3 changed files with 11 additions and 1 deletions

View File

@@ -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:

View File

@@ -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.}

View File

@@ -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.}