also you can use 
[quote](https://nim-lang.github.io/Nim/macros.html#quote%2Ctyped%2Cstring) proc 
which easier to use
    
    
    macro compileFiles(path: static[string], files: untyped): untyped =
      result = newStmtList()
      for f in files:
        let file = newLit(path & $f)
        result.add quote do:
          {.compile: `file`.}
    
    compileFiles("/base/path/"):
      "a.c"
      "b.c"
      "c.c"
    
    
    Run

Reply via email to