Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Apr 23, 2017
1 parent 1b36471 commit 332810c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/kotlin/org/lice/compiler/parse/Number.kt
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ fun String.toBinInt(): Int {

fun String.toBigInt() = BigInteger(this.substring(0, length - 1).run {
when {
isHexInt() -> toHexInt()
isBinInt() -> toBinInt()
isOctInt() -> toOctInt()
else -> toInt()
isHexInt() -> toHexInt().toString()
isBinInt() -> toBinInt().toString()
isOctInt() -> toOctInt().toString()
else -> this
}
}.toString())
})

fun String.toBigDec() = BigDecimal(this.substring(0, length - 1))

Expand Down

0 comments on commit 332810c

Please sign in to comment.