diff options
author | Sean McDirmid <sean.mcdirmid@gmail.com> | 2006-11-02 15:12:06 +0000 |
---|---|---|
committer | Sean McDirmid <sean.mcdirmid@gmail.com> | 2006-11-02 15:12:06 +0000 |
commit | d433eb14c8a069f349979282b0acb71cedb43b49 (patch) | |
tree | 91221f505760c5cd53c4f6978288617661c892e6 /src/compiler/scala/tools/nsc/Global.scala | |
parent | 2b3c8f9449bfd44375aa266035800c7b616aefbe (diff) | |
download | scala-d433eb14c8a069f349979282b0acb71cedb43b49.tar.gz scala-d433eb14c8a069f349979282b0acb71cedb43b49.tar.bz2 scala-d433eb14c8a069f349979282b0acb71cedb43b49.zip |
Some of these haven't changed, but SVN is too s...
Some of these haven't changed, but SVN is too stupid to care. Adding IDE
hooks to Global.
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index 3a0e38c5c0..baeae2cc93 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -622,15 +622,21 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable def forCLDC: Boolean = settings.target.value == "cldc" def onlyPresentation = settings.doc.value // position stuff - protected val positionConfiguration: PositionConfiguration = new PositionConfiguration { + final val positionConfiguration: PositionConfiguration = initConfig; + protected def initConfig : PositionConfiguration = posConfig; + + private object posConfig extends PositionConfiguration { type PositionType = Int - def coercePosToInt(pos: PositionType): Int = pos - def coerceIntToPos(pos: Int): PositionType = pos - val NoPos: PositionType = Position.NOPOS - val FirstPos: PositionType = Position.FIRSTPOS + def coercePosToInt(pos: Int): Int = pos + def coerceIntToPos(pos: Int): Int = pos + val NoPos: Int = Position.NOPOS + val FirstPos: Int = Position.FIRSTPOS } final type PositionType = positionConfiguration.PositionType - final val FirstPos = positionConfiguration.FirstPos + final val FirstPos = { + val posConfig : PositionConfiguration = positionConfiguration; + posConfig.FirstPos.asInstanceOf[PositionType]; + } final val NoPos = positionConfiguration.NoPos final def coerceIntToPos(pos: Int): PositionType = positionConfiguration.coerceIntToPos(pos) |