Closed JohnReedLOL closed 8 years ago
this...
def traceLinesCodeImpl(c: Compat.Context)(toPrint: c.Expr[Any], numLines: c.Expr[Int]): c.Expr[String] = { import c.universe._ val blockString = (new MacroHelperMethod[c.type](c)).getSourceCode(toPrint.tree) val arg1 = q""" "(" + $blockString + ") -> " + ({$toPrint}.toString) """ val arg2 = q"$numLines" val args: List[c.universe.Tree] = List(arg1, arg2) val toReturn = q""" _root_.scala.trace.Debug.err(..$args); """ c.Expr[String](toReturn) }
should say " root.scala.trace.Debug.out(..$args);"
this...
should say " root.scala.trace.Debug.out(..$args);"