From f8a42a0584d855a0548c20c7434ed83a59647ed9 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 18 Jun 2013 19:38:09 +0200 Subject: Added typedIdent method. Also some refactorings that were caused by adding this method. --- src/dotty/tools/dotc/core/Contexts.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/dotty/tools/dotc/core/Contexts.scala') diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index 588c18c4c..874f28bce 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -138,10 +138,10 @@ object Contexts { protected def typer_=(typer: Typer) = _typer = typer def typer: Typer = _typer - /** The currently visible imports */ - private[this] var _imports: List[ImportInfo] = _ - protected def imports_=(imports: List[ImportInfo]) = _imports = imports - def imports: List[ImportInfo] = _imports + /** The currently active import info */ + private[this] var _importInfo: ImportInfo = _ + protected def importInfo_=(importInfo: ImportInfo) = _importInfo = importInfo + def importInfo: ImportInfo = _importInfo /** The current reporter */ private[this] var _reporter: Reporter = _ @@ -263,7 +263,7 @@ object Contexts { def withScope(scope: Scope): this.type = { this.scope = scope; this } def withNewScope: this.type = { this.scope = newScope; this } def withTyper(typer: Typer): this.type = { this.typer = typer; this.scope = typer.scope; this } - def withImport(importInfo: ImportInfo): this.type = { this.imports = importInfo :: imports; this } + def withImportInfo(importInfo: ImportInfo): this.type = { this.importInfo = importInfo; this } def withReporter(reporter: Reporter): this.type = { this.reporter = reporter; this } def withDiagnostics(diagnostics: Option[StringBuilder]): this.type = { this.diagnostics = diagnostics; this } def withMoreProperties(moreProperties: Map[String, Any]): this.type = { this.moreProperties = moreProperties; this } -- cgit v1.2.3