summaryrefslogtreecommitdiff
path: root/sources/scalac/Global.java
diff options
context:
space:
mode:
authorcremet <cremet@epfl.ch>2003-07-30 08:27:43 +0000
committercremet <cremet@epfl.ch>2003-07-30 08:27:43 +0000
commit90b4108f4586d850a63f40ce2624527a7a270b97 (patch)
treef9f5d7918399752dd4a41dc366fb9054f6a40881 /sources/scalac/Global.java
parent3016ae3a598a964690e12ccd2b1de2e8f7cd7a63 (diff)
downloadscala-90b4108f4586d850a63f40ce2624527a7a270b97.tar.gz
scala-90b4108f4586d850a63f40ce2624527a7a270b97.tar.bz2
scala-90b4108f4586d850a63f40ce2624527a7a270b97.zip
Added:
- collecting of documentation comments. - options for scaladoc - a class to load a documentation module.
Diffstat (limited to 'sources/scalac/Global.java')
-rw-r--r--sources/scalac/Global.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/sources/scalac/Global.java b/sources/scalac/Global.java
index ad0eed1eb7..b5ef83b8ab 100644
--- a/sources/scalac/Global.java
+++ b/sources/scalac/Global.java
@@ -86,6 +86,20 @@ public class Global {
public OutputStream printStream;
public final TreePrinter debugPrinter;
+ /** documentation comments of trees
+ */
+ public final Map/*<Tree, String>*/ mapTreeComment = new HashMap();
+
+ /** documentation comments of symbols
+ */
+ public final Map/*<Symbol, String>*/ mapSymbolComment = new HashMap();
+
+ /** scaladoc option (with docmodule and docmodulepath)
+ */
+ public final boolean doc;
+ public final String docmodule;
+ public final String docmodulePath;
+
/** The set of currenttly compiled top-level symbols
*/
public HashMap/*<Symbol,Sourcefile>*/ compiledNow = new HashMap();
@@ -174,6 +188,9 @@ public class Global {
else
this.printer = new HTMLTreePrinter(printStream);
this.debugPrinter = new TextTreePrinter(System.err, true);
+ this.doc = args.doc.value;
+ this.docmodule = args.docmodule.value;
+ this.docmodulePath = args.docmodulePath.value;
this.freshNameCreator = new FreshNameCreator();
this.make = new DefaultTreeFactory();
this.currentPhase = PhaseDescriptor.INITIAL;
@@ -288,6 +305,11 @@ public class Global {
}
if (currentPhase == PHASE.PARSER) fix1();
if (currentPhase == PHASE.ANALYZER) fix2();
+ if (currentPhase == PHASE.ANALYZER && doc) {
+ DocModule.apply(this);
+ operation("stopped after phase " + currentPhase.name());
+ break;
+ }
}
if (reporter.errors() != 0) {
imports.clear();