diff options
author | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-12-18 18:33:03 +0000 |
---|---|---|
committer | Gilles Dubochet <gilles.dubochet@epfl.ch> | 2005-12-18 18:33:03 +0000 |
commit | d3819b93ab8b2de3d5cc35c33b8258ccdb5a931a (patch) | |
tree | dfc6f7f497e58ea3321e6f687b11313d2afa86b5 /sources/scalac/CompilationUnit.java | |
parent | 0e82079908655682e5140ad521cef0572cb6d2a4 (diff) | |
download | scala-d3819b93ab8b2de3d5cc35c33b8258ccdb5a931a.tar.gz scala-d3819b93ab8b2de3d5cc35c33b8258ccdb5a931a.tar.bz2 scala-d3819b93ab8b2de3d5cc35c33b8258ccdb5a931a.zip |
Removed old Scalac code in sources and various ...
Removed old Scalac code in sources and various other obsolete elements.
Diffstat (limited to 'sources/scalac/CompilationUnit.java')
-rw-r--r-- | sources/scalac/CompilationUnit.java | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/sources/scalac/CompilationUnit.java b/sources/scalac/CompilationUnit.java deleted file mode 100644 index 44e131bed7..0000000000 --- a/sources/scalac/CompilationUnit.java +++ /dev/null @@ -1,89 +0,0 @@ -/* ____ ____ ____ ____ ______ *\ -** / __// __ \/ __// __ \/ ____/ SOcos COmpiles Scala ** -** __\_ \/ /_/ / /__/ /_/ /\_ \ (c) 2002, LAMP/EPFL ** -** /_____/\____/\___/\____/____/ ** -** ** -** $Id$ -\* */ - -package scalac; - -import scala.tools.util.Position; -import scala.tools.util.SourceFile; - -import scalac.ast.Tree; -import scalac.atree.ARepository; -import scalac.util.FreshNameCreator; -import java.util.HashMap; - - -/** A representation for a compilation unit in scala - * - * @author Matthias Zenger - * @version 1.0 - */ -public class CompilationUnit { - - /** the global compilation environment - */ - public final Global global; - - /** the associated source code file - */ - public final SourceFile source; - - /** does this unit come from the interpreter console - */ - public final boolean console; - - /** is this unit only there for mixin expansion? - */ - public final boolean mixinOnly; - - /** the fresh name creator - */ - public final FreshNameCreator fresh; - - /** the content of the compilation unit in tree form - */ - public Tree[] body; - public ARepository repository; - - public CompilationUnit(Global global, SourceFile source, - boolean console, boolean mixinOnly) { - this.global = global; - this.source = source; - this.console = console; - this.mixinOnly = mixinOnly; - this.fresh = new FreshNameCreator(); - } - - public CompilationUnit(Global global, SourceFile source, boolean console) { - this(global, source, console, false); - } - - /** return the position representing the given encoded position - */ - public Position position(int pos) { - return new Position(source, pos); - } - - /** issue an error in this compilation unit at a specific location - */ - public void error(int pos, String message) { - global.reporter.error(position(pos), message); - } - - /** issue a warning in this compilation unit at a specific location - */ - public void warning(int pos, String message) { - global.reporter.warning(position(pos), message); - } - - /** return a string representation - */ - public String toString() { - return source.toString(); - } - -} |