Last active
November 11, 2015 16:44
-
-
Save theduke/6bfa46738f679f036712 to your computer and use it in GitHub Desktop.
Nim bindSym test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import macros | |
proc myEcho() = | |
echo("myEcho") | |
macro m1(body: stmt): stmt = | |
result = newNimNode(nnkStmtList) | |
result.add(newCall(bindSym("myEcho", rule=brOpen))) | |
m1(): | |
discard | |
proc test1() = | |
proc myEcho() = echo("customEcho") | |
m1(): | |
discard | |
test1() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment