summaryrefslogtreecommitdiff
path: root/src/reflect
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-09-26 10:48:14 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-09-27 15:53:17 +0200
commit7e5646388243522bef8f4a1a1e255c7d8e30236d (patch)
treec28c7fc4240351e3fb9abf1f60a4cf15b8af97e0 /src/reflect
parenta79ba085c5304e304e617c7d95520d25e955d88f (diff)
downloadscala-7e5646388243522bef8f4a1a1e255c7d8e30236d.tar.gz
scala-7e5646388243522bef8f4a1a1e255c7d8e30236d.tar.bz2
scala-7e5646388243522bef8f4a1a1e255c7d8e30236d.zip
revives macros.Infrastructure
Takes macros.Settings, throws away its mutable parts, moves classPath from Run back to the top level - and unites all that in the Infrastructure trait.
Diffstat (limited to 'src/reflect')
-rw-r--r--src/reflect/scala/reflect/macros/Context.scala2
-rw-r--r--src/reflect/scala/reflect/macros/Infrastructure.scala19
-rw-r--r--src/reflect/scala/reflect/macros/Settings.scala36
-rw-r--r--src/reflect/scala/reflect/macros/Universe.scala3
4 files changed, 20 insertions, 40 deletions
diff --git a/src/reflect/scala/reflect/macros/Context.scala b/src/reflect/scala/reflect/macros/Context.scala
index 1d49cc48c1..7a365ed37b 100644
--- a/src/reflect/scala/reflect/macros/Context.scala
+++ b/src/reflect/scala/reflect/macros/Context.scala
@@ -10,7 +10,7 @@ trait Context extends Aliases
with Names
with Reifiers
with FrontEnds
- with Settings
+ with Infrastructure
with Typers
with Parsers
with Evals
diff --git a/src/reflect/scala/reflect/macros/Infrastructure.scala b/src/reflect/scala/reflect/macros/Infrastructure.scala
new file mode 100644
index 0000000000..a1ef1c87a3
--- /dev/null
+++ b/src/reflect/scala/reflect/macros/Infrastructure.scala
@@ -0,0 +1,19 @@
+package scala.reflect
+package macros
+
+trait Infrastructure {
+ self: Context =>
+
+ /** Exposes macro-specific settings as a list of strings.
+ * These settings are passed to the compiler via the "-Xmacro-settings:setting1,setting2...,settingN" command-line option.
+ */
+ def settings: List[String]
+
+ /** Exposes current compiler settings as a list of options.
+ * Use `scalac -help`, `scalac -X` and `scalac -Y` to learn about currently supported options.
+ */
+ def compilerSettings: List[String]
+
+ /** Exposes current classpath. */
+ def classPath: List[java.net.URL]
+} \ No newline at end of file
diff --git a/src/reflect/scala/reflect/macros/Settings.scala b/src/reflect/scala/reflect/macros/Settings.scala
deleted file mode 100644
index a2cdb4c8e1..0000000000
--- a/src/reflect/scala/reflect/macros/Settings.scala
+++ /dev/null
@@ -1,36 +0,0 @@
-package scala.reflect
-package macros
-
-trait Settings {
- self: Context =>
-
- /** Exposes macro-specific settings as a list of strings.
- * These settings are passed to the compiler via the "-Xmacro-settings:setting1,setting2...,settingN" command-line option.
- */
- def settings: List[String]
-
- /** Exposes current compiler settings as a list of options.
- * Use `scalac -help`, `scalac -X` and `scalac -Y` to learn about currently supported options.
- */
- def compilerSettings: List[String]
-
- /** Updates current compiler settings with an option string.
- * Use `scalac -help`, `scalac -X` and `scalac -Y` to learn about currently supported options.
- */
- def setCompilerSettings(options: String): this.type
-
- /** Updates current compiler settings with a list of options.
- * Use `scalac -help`, `scalac -X` and `scalac -Y` to learn about currently supported options.
- */
- def setCompilerSettings(options: List[String]): this.type
-
- /** Temporarily sets compiler settings to a given option string and executes a given closure.
- * Use `scalac -help`, `scalac -X` and `scalac -Y` to learn about currently supported options.
- */
- def withCompilerSettings[T](options: String)(op: => T): T
-
- /** Temporarily sets compiler settings to a given list of options and executes a given closure.
- * Use `scalac -help`, `scalac -X` and `scalac -Y` to learn about currently supported options.
- */
- def withCompilerSettings[T](options: List[String])(op: => T): T
-} \ No newline at end of file
diff --git a/src/reflect/scala/reflect/macros/Universe.scala b/src/reflect/scala/reflect/macros/Universe.scala
index 0aa3e1fa6a..97d0a8d98a 100644
--- a/src/reflect/scala/reflect/macros/Universe.scala
+++ b/src/reflect/scala/reflect/macros/Universe.scala
@@ -135,9 +135,6 @@ abstract class Universe extends scala.reflect.api.Universe {
/** All units of work comprising this compilation run. */
def units: Iterator[CompilationUnit]
-
- /** Classpath of this compilation run. */
- def classPath: List[java.net.URL]
}
type CompilationUnit <: CompilationUnitContextApi