diff options
author | Martin Odersky <odersky@gmail.com> | 2013-05-08 17:39:08 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-05-08 17:39:08 +0200 |
commit | bfa03db8ea8897f51316cd77a7c71b2ca25ba531 (patch) | |
tree | 6a820b8ca9017f8e0234ba2b13f50640c82dbd5a /src/dotty/tools/dotc/util/SourceFile.scala | |
parent | 214eb8b650a86d1708b1257f89f53840a121de62 (diff) | |
download | dotty-bfa03db8ea8897f51316cd77a7c71b2ca25ba531.tar.gz dotty-bfa03db8ea8897f51316cd77a7c71b2ca25ba531.tar.bz2 dotty-bfa03db8ea8897f51316cd77a7c71b2ca25ba531.zip |
Improvements in error handling of parser
Also some simplifications and eliminations of unused code.
Diffstat (limited to 'src/dotty/tools/dotc/util/SourceFile.scala')
-rw-r--r-- | src/dotty/tools/dotc/util/SourceFile.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/util/SourceFile.scala b/src/dotty/tools/dotc/util/SourceFile.scala index a7a677560..b67eefdfa 100644 --- a/src/dotty/tools/dotc/util/SourceFile.scala +++ b/src/dotty/tools/dotc/util/SourceFile.scala @@ -44,6 +44,8 @@ case class SourceFile(file: AbstractFile, content: Array[Char]) { } override def hashCode = file.path.## + start.## + def apply(idx: Int) = content.apply(idx) + val length = content.length /** true for all source files except `NoSource` */ |