All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dongxiguo.zeroLog.context.CurrentSource.scala Maven / Gradle / Ivy

package com.dongxiguo.zeroLog.context

import language.experimental.macros

final class CurrentSource (val get: String) extends AnyVal

object CurrentSource {

  final def currentSource_impl(c: scala.reflect.macros.Context) = {
    import c.universe._
    val sourceExpr = c.Expr(Literal(Constant(c.enclosingPosition.source.path)))
    reify(new _root_.com.dongxiguo.zeroLog.context.CurrentSource(sourceExpr.splice))
  }
  implicit final def currentSource: CurrentSource = macro currentSource_impl

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy