I see warnings that callsite() is being deprecated.

I use this macro and would like to know how to rewrite

it without using callsite() to achieve the same effect.
    
    
    macro styledEchoPrint*(m: varargs[untyped]): typed =
      ## partially lifted from an earler macro in terminal.nim and removed new 
line
      let m = callsite()
      result = newNimNode(nnkStmtList)
      for i in countup(1, m.len - 1):
          result.add(newCall(bindSym"styledEchoProcessArg", m[i]))
      result.add(newCall(bindSym"write", bindSym"stdout", newStrLitNode("")))
      result.add(newCall(bindSym"resetAttributes"))
    

Reply via email to