blob: 26833ca0b92703114bd0a9b7f25e8a64a1a1fe06 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import scala.reflect.makro.{Context => Ctx}
object Impls {
def foo(c: Ctx) = {
import c.universe._
val body = Apply(Select(Ident(definitions.PredefModule), newTermName("println")), List(Literal(Constant("it works"))))
c.Expr[Unit](body)
}
def fooFoo(c: Ctx) = {
import c.universe._
val body = Select(Ident(newTermName("Macros")), newTermName("foo"))
c.Expr[Unit](body)
}
}
|