diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2013-12-07 14:13:58 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2013-12-30 19:07:04 +0300 |
commit | 68b8e23585b5bbf7ff40d585634a7f07680c278b (patch) | |
tree | 0f37b8119f14471ede754768ba62db60c08c4869 /src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala | |
parent | 279e2e3b500c63b867d6f2c26a99aa44babfb8e4 (diff) | |
download | scala-68b8e23585b5bbf7ff40d585634a7f07680c278b.tar.gz scala-68b8e23585b5bbf7ff40d585634a7f07680c278b.tar.bz2 scala-68b8e23585b5bbf7ff40d585634a7f07680c278b.zip |
hooks for typecheck and expansion of macro defs
Creates MacroPlugin, a sister interface of AnalyzerPlugin in the namer/typer
extensibility interface.
Exposes `pluginsTypedMacroBody`, `pluginsMacroExpand`, `pluginsMacroArgs`
and `pluginsMacroRuntime` in the macro plugin interface. This will
make it easy to prototype changes to the macro engine without disturbing scala/scala.
Diffstat (limited to 'src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala')
-rw-r--r-- | src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala b/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala index 7de3341304..2b73d932d4 100644 --- a/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala +++ b/src/compiler/scala/reflect/macros/runtime/MacroRuntimes.scala @@ -20,7 +20,8 @@ trait MacroRuntimes extends JavaReflectionRuntimes with ScalaReflectionRuntimes * `null` otherwise. */ private val macroRuntimesCache = perRunCaches.newWeakMap[Symbol, MacroRuntime] - def macroRuntime(macroDef: Symbol): MacroRuntime = { + def macroRuntime(expandee: Tree): MacroRuntime = { + val macroDef = expandee.symbol macroLogVerbose(s"looking for macro implementation: $macroDef") if (fastTrack contains macroDef) { macroLogVerbose("macro expansion is serviced by a fast track") |