diff options
author | Martin Odersky <odersky@gmail.com> | 2009-12-07 17:31:49 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-12-07 17:31:49 +0000 |
commit | 1e88594f358d08b5e9b22ba87280003a581359e4 (patch) | |
tree | e68b6d1095ff1b1345e86d8a67c1f874849a31ff /src/compiler/scala/tools/nsc/Global.scala | |
parent | de1d172a15e20ec7e96d96d5cea5cb41162b9f75 (diff) | |
download | scala-1e88594f358d08b5e9b22ba87280003a581359e4.tar.gz scala-1e88594f358d08b5e9b22ba87280003a581359e4.tar.bz2 scala-1e88594f358d08b5e9b22ba87280003a581359e4.zip |
new doc comment generation, including some new ...
new doc comment generation, including some new style doc comments in
collection classes.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 35 |
1 files changed, 5 insertions, 30 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 6b2f3101a6..645eb1ecf6 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -115,31 +115,6 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable val treeBrowser = treeBrowsers.create() - -// val copy = new LazyTreeCopier() - - /** A map of all doc comments, indexed by symbols. - * Only active in onlyPresentation mode - */ - val comments = - if (onlyPresentation) new HashMap[Symbol,String] - else null - - /** A map of all doc comments source file offsets, - * indexed by symbols. - * Only active in onlyPresentation mode - */ - val commentOffsets = - if (onlyPresentation) new HashMap[Symbol,Int] - else null - - /** A map of argument names for methods - * !!! can be dropped once named method arguments are in !!! - */ - val methodArgumentNames = - if (onlyPresentation) new HashMap[Symbol,List[List[Symbol]]] - else null - // ------------ Hooks for interactive mode------------------------- /** Called every time an AST node is succesfully typedchecked in typerPhase. @@ -302,8 +277,8 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable val unit0 = currentRun.currentUnit try { currentRun.currentUnit = unit - reporter.setSource(unit.source) - if (!cancelled(unit)) apply(unit) + if (!cancelled(unit)) + reporter.withSource(unit.source) { apply(unit) } currentRun.advanceUnit } finally { //assert(currentRun.currentUnit == unit) @@ -889,11 +864,11 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable var localPhase = firstPhase.asInstanceOf[GlobalPhase] while (localPhase != null && (localPhase.id < globalPhase.id || localPhase.id <= namerPhase.id)/* && !reporter.hasErrors*/) { val oldSource = reporter.getSource - reporter.setSource(unit.source) - atPhase(localPhase)(localPhase.applyPhase(unit)) + reporter.withSource(unit.source) { + atPhase(localPhase)(localPhase.applyPhase(unit)) + } val newLocalPhase = localPhase.next.asInstanceOf[GlobalPhase] localPhase = if (localPhase == newLocalPhase) null else newLocalPhase - reporter.setSource(oldSource) } refreshProgress } |