From b23d885feb9c36007913caaf2104895212b33e1e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 21 Jul 2005 16:17:35 +0000 Subject: *** empty log message *** --- sources/scala/tools/nsc/typechecker/Analyzer.scala | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'sources/scala/tools/nsc/typechecker/Analyzer.scala') 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) + } + } } -- cgit v1.2.3