This works for me on 0.18 and devel
    
    
    import macros
    import strutils
    
    macro defthing(name: untyped): untyped =
      return parseStmt("let $1 = 1000".format(ident($name)))
    
    template calldefthing(name: untyped): untyped =
      # defthing name # argument is an identifier
      defthing `name Extra` # argument is not an identifier, I'd like to 
evaluate the `name Extra` before the macro is called
    
    calldefthing x
    

Reply via email to