diff options
author | Martin Odersky <odersky@gmail.com> | 2011-01-09 14:33:41 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2011-01-09 14:33:41 +0000 |
commit | 785621901acb1888f168c2b2075e85a64af70fb8 (patch) | |
tree | 29ba5e499c4b07bde75dc33b86afb6c70b5ed6b0 /src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | |
parent | d94210996beabaf1256f0b4fcdaf210e8431c2e5 (diff) | |
download | scala-785621901acb1888f168c2b2075e85a64af70fb8.tar.gz scala-785621901acb1888f168c2b2075e85a64af70fb8.tar.bz2 scala-785621901acb1888f168c2b2075e85a64af70fb8.zip |
Implemented toplevel browsing in IDE, so that s...
Implemented toplevel browsing in IDE, so that source files newer than
their class files are scanned for contained classes and modules. That
way, top-level symbols with names different than their enclosing class
can still be identified. I believe the same strategy should be used by
IDE/sbt builders. Reviw by plocinik
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Scanners.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Scanners.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala index 504fa75f6d..69063c3f69 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Scanners.scala @@ -1027,7 +1027,7 @@ trait Scanners extends ScannersCommon { else "'<" + token + ">'" } - class MalformedInput extends Exception + class MalformedInput(val offset: Int, val msg: String) extends Exception /** A scanner for a given source file not necessarily attached to a compilation unit. * Useful for looking inside source files that aren not currently compiled to see what's there @@ -1038,8 +1038,8 @@ trait Scanners extends ScannersCommon { // suppress warnings, throw exception on errors def warning(off: Offset, msg: String): Unit = {} - def error (off: Offset, msg: String): Unit = throw new MalformedInput - def incompleteInputError(off: Offset, msg: String): Unit = throw new MalformedInput + def error (off: Offset, msg: String): Unit = throw new MalformedInput(off, msg) + def incompleteInputError(off: Offset, msg: String): Unit = throw new MalformedInput(off, msg) } /** A scanner over a given compilation unit |