diff options
author | michelou <michelou@epfl.ch> | 2006-07-05 14:54:51 +0000 |
---|---|---|
committer | michelou <michelou@epfl.ch> | 2006-07-05 14:54:51 +0000 |
commit | ce9000fb3a7ee2d0bc833d28321253c3e4417372 (patch) | |
tree | 7d3b882e683d61fe1e6b295d0f47966df65fd319 /src | |
parent | be158db7ec08bf1d09c85a063a6137b3e8720fff (diff) | |
download | scala-ce9000fb3a7ee2d0bc833d28321253c3e4417372.tar.gz scala-ce9000fb3a7ee2d0bc833d28321253c3e4417372.tar.bz2 scala-ce9000fb3a7ee2d0bc833d28321253c3e4417372.zip |
removed leading/trailing tabs/blanks in nsc/Com...
removed leading/trailing tabs/blanks in nsc/CompilationUnits.scala
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/CompilationUnits.scala | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/compiler/scala/tools/nsc/CompilationUnits.scala b/src/compiler/scala/tools/nsc/CompilationUnits.scala index 24f0b66b8e..7300549484 100644 --- a/src/compiler/scala/tools/nsc/CompilationUnits.scala +++ b/src/compiler/scala/tools/nsc/CompilationUnits.scala @@ -1,40 +1,40 @@ -/* NSC -- new scala compiler - * Copyright 2005 LAMP/EPFL +/* NSC -- new Scala compiler + * Copyright 2005-2006 LAMP/EPFL * @author Martin Odersky */ // $Id$ -package scala.tools.nsc; +package scala.tools.nsc -import scala.tools.nsc.util.{SourceFile, Position}; -import scala.tools.nsc.util.FreshNameCreator; -import scala.tools.nsc.io.AbstractFile; -import scala.collection.mutable.HashSet; +import scala.tools.nsc.util.{FreshNameCreator,Position,SourceFile} +import scala.tools.nsc.io.AbstractFile +import scala.collection.mutable.HashSet trait CompilationUnits requires Global { class CompilationUnit(val source: SourceFile) { /** the fresh name creator */ - var fresh = new FreshNameCreator; + var fresh = new FreshNameCreator /** the content of the compilation unit in tree form */ - var body: Tree = EmptyTree; + var body: Tree = EmptyTree - val depends = new HashSet[AbstractFile]; + val depends = new HashSet[AbstractFile] - def position(pos: int) = new Position(source, pos); + def position(pos: int) = new Position(source, pos) val errorPositions = new HashSet[int] - def error(pos: int, msg: String) = { + def error(pos: int, msg: String) = if (!(errorPositions contains pos)) { - errorPositions += pos; - reporter.error(position(pos), msg); + errorPositions += pos + reporter.error(position(pos), msg) } - } - def warning(pos: int, msg: String) = reporter.warning(position(pos), msg); - override def toString() = source.toString(); + + def warning(pos: int, msg: String) = reporter.warning(position(pos), msg) + + override def toString() = source.toString() def clear() = { fresh = null |