summaryrefslogtreecommitdiff
path: root/main/core/src/mill/define/Caller.scala
blob: 6d2d4d1d8b6b0d393ec808c2fe7ad2757e744a31 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
package mill.define

import sourcecode.Compat.Context
import language.experimental.macros
case class Caller(value: Any)
object Caller {
  def apply()(implicit c: Caller) = c.value
  implicit def generate: Caller = macro impl
  def impl(c: Context): c.Tree = {
    import c.universe._
    q"new _root_.mill.define.Caller(this)"
  }
}