Added std/effecttraits.nim (#15462)
This commit is contained in:
parent
aa1d7fe1e9
commit
1f4b9cebd4
4 changed files with 53 additions and 1 deletions
19
lib/std/effecttraits.nim
Normal file
19
lib/std/effecttraits.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#
|
||||
#
|
||||
# Nim's Runtime Library
|
||||
# (c) Copyright 2018 Nim contributors
|
||||
#
|
||||
# See the file "copying.txt", included in this
|
||||
# distribution, for details about the copyright.
|
||||
#
|
||||
|
||||
## This module provides access to the inferred .raises effects
|
||||
## for Nim's macro system.
|
||||
|
||||
import macros
|
||||
|
||||
proc getRaisesListImpl(n: NimNode): NimNode = discard "see compiler/vmops.nim"
|
||||
|
||||
proc getRaisesList*(call: NimNode): NimNode =
|
||||
expectKind call, nnkCallKinds
|
||||
result = getRaisesListImpl(call[0])
|
||||
Loading…
Add table
Add a link
Reference in a new issue