diff options
author | Martin Odersky <odersky@gmail.com> | 2013-06-05 17:27:02 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-06-05 17:27:02 +0200 |
commit | 898fe8a499c97fa62840e2c79755fc729015a442 (patch) | |
tree | 95d0795c01764326bf51f2a0d4c8212b484e5da5 /src/dotty/tools/dotc/core/Contexts.scala | |
parent | b28c9ef75e274bdc54e9502e56c95b505495de5b (diff) | |
download | dotty-898fe8a499c97fa62840e2c79755fc729015a442.tar.gz dotty-898fe8a499c97fa62840e2c79755fc729015a442.tar.bz2 dotty-898fe8a499c97fa62840e2c79755fc729015a442.zip |
wip - partial redesign of namer/typer
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Contexts.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala index 6d566cdbd..346cf72f5 100644 --- a/src/dotty/tools/dotc/core/Contexts.scala +++ b/src/dotty/tools/dotc/core/Contexts.scala @@ -133,6 +133,11 @@ object Contexts { protected def scope_=(scope: Scope) = _scope = scope def scope: Scope = _scope + /** The current typer */ + private[this] var _typer: Typer = _ + 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 @@ -253,10 +258,11 @@ object Contexts { def withPlainPrinter(printer: Context => Printer): this.type = { this.plainPrinter = printer; this } def withRefinedPrinter(printer: Context => Printer): this.type = { this.refinedPrinter = printer; this } def withOwner(owner: Symbol): this.type = { this.owner = owner; this } - def withNewScope: this.type = { this.scope = newScope; this } def withSettings(sstate: SettingsState): this.type = { this.sstate = sstate; this } def withTree(tree: Tree[_ >: Untyped]): this.type = { this.tree = tree; this } 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 } def withImport(importInfo: ImportInfo): this.type = { this.imports = importInfo :: imports; this } def withReporter(reporter: Reporter): this.type = { this.reporter = reporter; this } def withDiagnostics(diagnostics: Option[StringBuilder]): this.type = { this.diagnostics = diagnostics; this } |