Advertisement
Guest User

Untitled

a guest
Aug 11th, 2014
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scala 0.41 KB | None | 0 0
  1. package fm.idetest.macros
  2.  
  3. import scala.language.experimental.macros
  4. import scala.reflect.macros.Context
  5.  
  6. object IDETestMacros {
  7.   def hello(): Unit = macro hello_impl
  8.  
  9.   def hello_impl(c: Context)(): c.Expr[Unit] = {
  10.     import c.universe._
  11.    
  12.     val prop = System.getProperty("idescalacoptionsdproperty")
  13.     c.eval(reify {
  14.       println(s"Hello World!, Macro Property: $prop")
  15.       })
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement