1 2 3 4 5 6 7 8 9 10 11
import language.experimental.macros import scala.reflect.macros.blackbox.Context object Macro { def apply(a: Any): Any = macro impl def impl(c: Context)(a: c.Tree): c.Tree = { import c.universe._ q"{$a; true}" } }