tmacros.nim 297 B

12345678910
  1. import macros
  2. block: # hasArgOfName
  3. macro m(u: untyped): untyped =
  4. for name in ["s","i","j","k","b","xs","ys"]:
  5. doAssert hasArgOfName(params u,name)
  6. doAssert not hasArgOfName(params u,"nonexistent")
  7. proc p(s: string; i,j,k: int; b: bool; xs,ys: seq[int] = @[]) {.m.} = discard