summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-07-05 20:08:53 +0000
committerMartin Odersky <odersky@gmail.com>2009-07-05 20:08:53 +0000
commit64e41b43cc2f000ecbccb527d17425d9f0ce7f98 (patch)
treecd8e704b18cc40701f38e90d8ea7418454ec84a2 /src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
parentc93f64f7ea35b53cdec95cad4891f7bd84604888 (diff)
downloadscala-64e41b43cc2f000ecbccb527d17425d9f0ce7f98.tar.gz
scala-64e41b43cc2f000ecbccb527d17425d9f0ce7f98.tar.bz2
scala-64e41b43cc2f000ecbccb527d17425d9f0ce7f98.zip
Fixed positions
Diffstat (limited to 'src/compiler/scala/tools/nsc/ast/parser/Parsers.scala')
-rwxr-xr-xsrc/compiler/scala/tools/nsc/ast/parser/Parsers.scala10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
index e5eaf8a8e0..8378d4ba8f 100755
--- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
+++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
@@ -117,7 +117,7 @@ self =>
/** the markup parser */
lazy val xmlp = new MarkupParser(this, true)
- object symbXMLBuilder extends SymbolicXMLBuilder(treeBuilder, this, true) { // DEBUG choices
+ object symbXMLBuilder extends SymbolicXMLBuilder(this, true) { // DEBUG choices
val global: self.global.type = self.global
def freshName(prefix: String): Name = UnitParser.this.freshName(prefix)
}
@@ -161,6 +161,7 @@ self =>
val global: self.global.type = self.global
def freshName(prefix: String): Name = Parser.this.freshName(prefix)
def o2p(offset: Int) = Parser.this.o2p(offset)
+ def r2p(start: Int, point: Int, end: Int) = Parser.this.r2p(start, point, end)
}
import treeBuilder.{global => _, _}
@@ -1795,7 +1796,10 @@ self =>
}
if (in.token == VIEWBOUND && (implicitViewBuf ne null))
implicitViewBuf += atPos(start, in.skipToken()) {
- makeFunctionTypeTree(List(Ident(pname)), typ())
+ val t = typ()
+ atPos(t.pos) {
+ makeFunctionTypeTree(List(Ident(pname)), t)
+ }
}
param
}
@@ -1822,7 +1826,7 @@ self =>
def bound(tok: Int, default: Name): Tree =
if (in.token == tok) { in.nextToken(); typ() }
- else rootScalaDot(default.toTypeName)
+ else atPos(o2p(in.lastOffset).toSynthetic) { rootScalaDot(default.toTypeName) }
/* -------- DEFS ------------------------------------------- */