diff options
author | paltherr <paltherr@epfl.ch> | 2003-11-05 16:35:15 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-11-05 16:35:15 +0000 |
commit | 57875e803374bf38d8ff5006c76aa2bb87fc2958 (patch) | |
tree | cdda11feb60195393181cb0af0933c7ac0910a98 /sources | |
parent | 49625177f16d47c1dc83b53f3f533808d6db3ca5 (diff) | |
download | scala-57875e803374bf38d8ff5006c76aa2bb87fc2958.tar.gz scala-57875e803374bf38d8ff5006c76aa2bb87fc2958.tar.bz2 scala-57875e803374bf38d8ff5006c76aa2bb87fc2958.zip |
- Added field Unit.repository
Diffstat (limited to 'sources')
-rw-r--r-- | sources/scalac/Unit.java | 2 | ||||
-rw-r--r-- | sources/scalac/atree/ATreePrinter.java | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sources/scalac/Unit.java b/sources/scalac/Unit.java index a57aab9f8a..db127fd48a 100644 --- a/sources/scalac/Unit.java +++ b/sources/scalac/Unit.java @@ -13,6 +13,7 @@ import ch.epfl.lamp.util.Position; import scalac.symtab.NameMangler; import scalac.ast.Tree; +import scalac.atree.ARepository; import java.util.HashMap; @@ -38,6 +39,7 @@ public class Unit { /** the content of the compilation unit in tree form */ public Tree[] body; + public ARepository repository; /** the name mangler */ diff --git a/sources/scalac/atree/ATreePrinter.java b/sources/scalac/atree/ATreePrinter.java index 971ede91ac..779a6c853e 100644 --- a/sources/scalac/atree/ATreePrinter.java +++ b/sources/scalac/atree/ATreePrinter.java @@ -237,6 +237,12 @@ public class ATreePrinter { //######################################################################## // Public Methods - Printing trees + /** Prints the unit. */ + public ATreePrinter printUnit(Unit unit) { + println("// Scala source: " + unit.source); + return printRepository(unit.repository); + } + /** Prints the repository. */ public ATreePrinter printRepository(ARepository repository) { AClass[] classes = repository.classes(); |