Move 'radixPrefix' from compiler modules to IDE modules

`radixPrefix` is used only in IDE now. So let's put it into IDE modules.

This commit is done in order to be able to use code dependent on
`radixPrefix` in `kotlin-ide` repo, because `kotlin-ide` depends on
1.4.0 artifacts of compiler. And `radixPrefix` isn't presented in
those artifacts
This commit is contained in:
Nikita Bobko
2020-08-05 20:08:27 +03:00
parent 093d4b3108
commit c5398e8317
2 changed files with 9 additions and 9 deletions
@@ -23,11 +23,3 @@ fun extractRadix(value: String): NumberWithRadix = when {
value.startsWith("0b") || value.startsWith("0B") -> NumberWithRadix(value.substring(2), 2)
else -> NumberWithRadix(value, 10)
}
val NumberWithRadix.radixPrefix: String
get() = when (radix) {
2 -> "0b"
10 -> ""
16 -> "0x"
else -> error("Invalid radix for $this")
}