summaryrefslogtreecommitdiff
path: root/sources/scala/tools/nsc/typechecker/Analyzer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-07-21 16:17:35 +0000
committerMartin Odersky <odersky@gmail.com>2005-07-21 16:17:35 +0000
commitb23d885feb9c36007913caaf2104895212b33e1e (patch)
tree83964c7ebb5bf44ec00b7b2dc33cbcb0a1a2889d /sources/scala/tools/nsc/typechecker/Analyzer.scala
parent2b073f0a006c77eb847fc5cbe3c2421b5e64498e (diff)
downloadscala-b23d885feb9c36007913caaf2104895212b33e1e.tar.gz
scala-b23d885feb9c36007913caaf2104895212b33e1e.tar.bz2
scala-b23d885feb9c36007913caaf2104895212b33e1e.zip
*** empty log message ***
Diffstat (limited to 'sources/scala/tools/nsc/typechecker/Analyzer.scala')
-rw-r--r--sources/scala/tools/nsc/typechecker/Analyzer.scala22
1 files changed, 21 insertions, 1 deletions
diff --git a/sources/scala/tools/nsc/typechecker/Analyzer.scala b/sources/scala/tools/nsc/typechecker/Analyzer.scala
index 108781e275..a0f3f19a8f 100644
--- a/sources/scala/tools/nsc/typechecker/Analyzer.scala
+++ b/sources/scala/tools/nsc/typechecker/Analyzer.scala
@@ -8,13 +8,33 @@ package scala.tools.nsc.typechecker;
/** The main attribution phase.
*/
abstract class Analyzer
- extends SubComponent
+ extends AnyRef
with Contexts
with Namers
with Typers
with Infer
with Variances
with EtaExpansion {
+
val global: Global;
+ import global._;
+
+ object namerFactory extends SubComponent {
+ val global: Analyzer.this.global.type = Analyzer.this.global;
+ val phaseName = "namer";
+ def newPhase(_prev: Phase): StdPhase = new StdPhase(_prev) {
+ def apply(unit: CompilationUnit): unit =
+ new Namer(startContext.make(unit)).enterSym(unit.body);
+ }
+ }
+
+ object typerFactory extends SubComponent {
+ val global: Analyzer.this.global.type = Analyzer.this.global;
+ val phaseName = "typer";
+ def newPhase(_prev: Phase): StdPhase = new StdPhase(_prev) {
+ def apply(unit: CompilationUnit): unit =
+ unit.body = newTyper(startContext.make(unit)).typed(unit.body)
+ }
+ }
}