macro foo(tag: static string = "", p: untyped): untyped =
result = p
proc bar() {.foo.} = ## Error: invalid pragma: foo
discard
the post not allow edit
UPDATE HERE:
macro foo(tag: static string = "", p: untyped): untyped = result = p proc bar() {.foo.} = ## Error: invalid pragma: foo discard proc bar() {.foo: "".} = ## this works discard