summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-07-30 11:04:21 +0000
committerMartin Odersky <odersky@gmail.com>2009-07-30 11:04:21 +0000
commit46f563457f9a1afe8e8b44923e279e816dcb6076 (patch)
tree943a0f8a0eb0f8f1047384937437d63aaa9a4929 /src
parent947abebda19ced98d6046dce0293164dbdb0d66e (diff)
downloadscala-46f563457f9a1afe8e8b44923e279e816dcb6076.tar.gz
scala-46f563457f9a1afe8e8b44923e279e816dcb6076.tar.bz2
scala-46f563457f9a1afe8e8b44923e279e816dcb6076.zip
Fixed test/positions/Empty regression.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/compiler/scala/tools/nsc/ast/parser/Parsers.scala8
-rw-r--r--src/compiler/scala/tools/nsc/util/Position.scala2
2 files changed, 4 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index 4f5be7cce0..ef9d678bd7 100755
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -2568,11 +2568,9 @@ self =>
ts.toList
}
val start = in.offset max 0
- atPos(start) {
- topstats() match {
- case List(stat @ PackageDef(_, _)) => stat
- case stats => makePackaging(start, atPos(o2p(start)) { Ident(nme.EMPTY_PACKAGE_NAME) }, stats)
- }
+ topstats() match {
+ case List(stat @ PackageDef(_, _)) => stat
+ case stats => makePackaging(start, atPos(o2p(start)) { Ident(nme.EMPTY_PACKAGE_NAME) }, stats)
}
}
}
diff --git a/src/compiler/scala/tools/nsc/util/Position.scala b/src/compiler/scala/tools/nsc/util/Position.scala
index ff2be66702..c5ad63fe2f 100644
--- a/src/compiler/scala/tools/nsc/util/Position.scala
+++ b/src/compiler/scala/tools/nsc/util/Position.scala
@@ -11,7 +11,7 @@ package util
object Position {
val tabInc = 8
}
-/** The class and its subclasses represent positions of ASTs and symbols.
+/** The Position class and its subclasses represent positions of ASTs and symbols.
* Except for NoPosition and FakePos, every position refers to a SourceFile
* and to an offset in the sourcefile (its `point'). For batch compilation,
* that's all. For interactive IDE's there are also RangePositions