-
-
Save ftsf/ffb596c02672a24b9ea126858d0afa13 to your computer and use it in GitHub Desktop.
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 | |
macro setField(obj: untyped, field: string, v: untyped): untyped = | |
let field = newIdentNode($`field`) | |
result = quote do: | |
`obj`.`field`=`v` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment