-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix build failure of the Scala 2.10 bridge sources
The fix was to just copy over the main code and adapt it to Scala 2.10 compiler API.
- Loading branch information
1 parent
49f8786
commit 469a3ac
Showing
7 changed files
with
348 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
internal/compiler-bridge/src-2.10/main/scala/xsbt/ClassName.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package xsbt | ||
|
||
/** | ||
* Utility methods for creating (source|binary) class names for a Symbol. | ||
*/ | ||
trait ClassName { | ||
val global: CallbackGlobal | ||
import global._ | ||
|
||
/** | ||
* Creates a flat (binary) name for a class symbol `s`. | ||
*/ | ||
protected def flatname(s: Symbol, separator: Char) = | ||
atPhase(currentRun.flattenPhase.next) { s fullName separator } | ||
|
||
/** | ||
* Create a (source) name for a class symbol `s`. | ||
*/ | ||
protected def className(s: Symbol): String = pickledName(s) | ||
|
||
private def pickledName(s: Symbol): String = | ||
atPhase(currentRun.picklerPhase) { s.fullName } | ||
|
||
protected def isTopLevelModule(sym: Symbol): Boolean = | ||
atPhase(currentRun.picklerPhase.next) { | ||
sym.isModuleClass && !sym.isImplClass && !sym.isNestedClass | ||
} | ||
|
||
protected def flatclassName(s: Symbol, sep: Char, dollarRequired: Boolean): String = | ||
flatname(s, sep) + (if (dollarRequired) "$" else "") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.