Added std/effecttraits.nim (#15462)

This commit is contained in:
Andreas Rumpf
2020-10-02 17:22:31 +02:00
committed by GitHub
parent aa1d7fe1e9
commit 1f4b9cebd4
4 changed files with 53 additions and 1 deletions

19
lib/std/effecttraits.nim Normal file
View 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])