scala.reflect.reify.codegen.GenNames.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala-compiler Show documentation
Show all versions of scala-compiler Show documentation
Compiler for the Scala Programming Language
package scala.reflect.reify
package codegen
trait GenNames {
self: Reifier =>
import global._
import definitions._
def reifyName(name: Name) = {
val factory = if (name.isTypeName) nme.nmeNewTypeName else nme.nmeNewTermName
mirrorCall(factory, Literal(Constant(name.toString)))
}
}