mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-21 08:21:32 +00:00
Added std/effecttraits.nim (#15462)
This commit is contained in:
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])
|
||||
Reference in New Issue
Block a user