Created
June 21, 2015 19:56
-
-
Save SPY/67ee9b7ba12edcec3212 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
proc enumDef(x: NimNode): NimNode = | |
result = quote do: | |
type `x` = enum enOne, enTwo | |
macro one(x): stmt {. immediate .} = | |
echo treeRepr(x) | |
result = enumDef(x) | |
echo treeRepr(result) | |
one SuperEnum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment