blob: 6d8e55cc355b120c0cf86615909d4ac3220d33df (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package scala.reflect.makro
package runtime
trait Infrastructure {
self: Context =>
val forJVM: Boolean = mirror.forJVM
val forMSIL: Boolean = mirror.forMSIL
val forInteractive: Boolean = mirror.forInteractive
val forScaladoc: Boolean = mirror.forScaladoc
val currentRun: Run = mirror.currentRun
type Run = mirror.Run
object Run extends RunExtractor {
def unapply(run: Run): Option[(CompilationUnit, List[CompilationUnit])] = Some(run.currentUnit, run.units.toList)
}
type CompilationUnit = mirror.CompilationUnit
object CompilationUnit extends CompilationUnitExtractor {
def unapply(compilationUnit: CompilationUnit): Option[(java.io.File, Array[Char], Tree)] = Some(compilationUnit.source.file.file, compilationUnit.source.content, compilationUnit.body)
}
val currentMacro: Symbol = expandee.symbol
val globalCache: collection.mutable.Map[Any, Any] = mirror.analyzer.globalMacroCache
val cache: collection.mutable.Map[Any, Any] = mirror.analyzer.perRunMacroCache.getOrElseUpdate(currentMacro, collection.mutable.Map[Any, Any]())
}
|