This is part 2 of an ongoing series of my efforts to learn the programming language Nim. I give you a quick overview on how to create a simple macro using pattern matching as well as pragmas and reflection functions.
By the way, you can use std/ prefix to import stdlib modules, that way they wouldn't clash with your own modules, like
import std/macros
# multiple modules
import std/[strutils, parseutils]
Nice video!
return is generally reserved for an early exit from a proc/func/template/macro and instead assigning to the implicitly initialized result variable or implicit return is used.