From 90b4108f4586d850a63f40ce2624527a7a270b97 Mon Sep 17 00:00:00 2001 From: cremet Date: Wed, 30 Jul 2003 08:27:43 +0000 Subject: Added: - collecting of documentation comments. - options for scaladoc - a class to load a documentation module. --- sources/scalac/Global.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'sources/scalac/Global.java') 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/**/ mapTreeComment = new HashMap(); + + /** documentation comments of symbols + */ + public final Map/**/ 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/**/ 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(); -- cgit v1.2.3