use single backtick (#17141)

This commit is contained in:
flywind 2021-02-21 21:53:28 -06:00 • committed by GitHub
commit 4556901572
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 68 additions and 68 deletions

View file

@ -12,7 +12,7 @@
## **Since**: Version 1.4.
##
## One can test for the existance of this standard module
## via ``defined(nimHasEffectTraitsModule)``.
## via `defined(nimHasEffectTraitsModule)`.
import macros
@ -22,33 +22,33 @@ proc isGcSafeImpl(n: NimNode): bool = discard "see compiler/vmops.nim"
proc hasNoSideEffectsImpl(n: NimNode): bool = discard "see compiler/vmops.nim"
proc getRaisesList*(fn: NimNode): NimNode =
## Extracts the ``.raises`` list of the func/proc/etc ``fn``.
## ``fn`` has to be a resolved symbol of kind ``nnkSym``. This
## implies that the macro that calls this proc should accept ``typed``
## arguments and not ``untyped`` arguments.
## Extracts the `.raises` list of the func/proc/etc `fn`.
## `fn` has to be a resolved symbol of kind `nnkSym`. This
## implies that the macro that calls this proc should accept `typed`
## arguments and not `untyped` arguments.
expectKind fn, nnkSym
result = getRaisesListImpl(fn)
proc getTagsList*(fn: NimNode): NimNode =
## Extracts the ``.tags`` list of the func/proc/etc ``fn``.
## ``fn`` has to be a resolved symbol of kind ``nnkSym``. This
## implies that the macro that calls this proc should accept ``typed``
## arguments and not ``untyped`` arguments.
## Extracts the `.tags` list of the func/proc/etc `fn`.
## `fn` has to be a resolved symbol of kind `nnkSym`. This
## implies that the macro that calls this proc should accept `typed`
## arguments and not `untyped` arguments.
expectKind fn, nnkSym
result = getTagsListImpl(fn)
proc isGcSafe*(fn: NimNode): bool =
## Return true if the func/proc/etc ``fn`` is `gcsafe`.
## ``fn`` has to be a resolved symbol of kind ``nnkSym``. This
## implies that the macro that calls this proc should accept ``typed``
## arguments and not ``untyped`` arguments.
## Return true if the func/proc/etc `fn` is `gcsafe`.
## `fn` has to be a resolved symbol of kind `nnkSym`. This
## implies that the macro that calls this proc should accept `typed`
## arguments and not `untyped` arguments.
expectKind fn, nnkSym
result = isGcSafeImpl(fn)
proc hasNoSideEffects*(fn: NimNode): bool =
## Return true if the func/proc/etc ``fn`` has `noSideEffect`.
## ``fn`` has to be a resolved symbol of kind ``nnkSym``. This
## implies that the macro that calls this proc should accept ``typed``
## arguments and not ``untyped`` arguments.
## Return true if the func/proc/etc `fn` has `noSideEffect`.
## `fn` has to be a resolved symbol of kind `nnkSym`. This
## implies that the macro that calls this proc should accept `typed`
## arguments and not `untyped` arguments.
expectKind fn, nnkSym
result = hasNoSideEffectsImpl(fn)