blob: 4dca644172a029854812c26864636e4a9d4b4a28 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import scala.language.experimental.macros
import scala.reflect.macros.blackbox.Context
object Macros {
def one(x: Int): Unit = macro oneImpl
def oneImpl(c: Context)(x: c.Tree) = {
import c.universe._
q"()"
}
def two(x: Int)(y: Int): Unit = macro twoImpl
def twoImpl(c: Context)(x: c.Tree)(y: c.Tree) = {
import c.universe._
q"()"
}
}
|