Skip to content

Commit 3335432

Browse files
committed
Bump Parsers compat
1 parent 2031da9 commit 3335432

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ version = "0.4.2"
77
Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
88

99
[compat]
10+
Parsers = "2.7"
1011
julia = "1.6"
1112

1213
[extras]

src/parse.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ const OPTIONS_ROUND_NEAREST = Parsers.Options(rounding=RoundNearest)
2222
const OPTIONS_ROUND_TO_ZERO = Parsers.Options(rounding=RoundToZero)
2323
const OPTIONS_ROUND_THROWS = Parsers.Options(rounding=nothing)
2424

25+
# TODO: a lookup table per type would be faster
2526
@inline _shift(n::T, decpos) where {T} = T(10)^decpos * n
2627

2728
const _BIGINT1 = BigInt(1)
@@ -37,7 +38,7 @@ for T in (Base.BitSigned_types..., Base.BitUnsigned_types...)
3738
end
3839
end
3940

40-
# All `v`s either UInt64, UInt128 and positive Integers
41+
# All `v`s are non-negative
4142
function _unsafe_convert_int(::Type{T}, v::V) where {T<:Integer,V<:Integer}
4243
return sizeof(T) > sizeof(V) ? T(v) :
4344
sizeof(T) < sizeof(V) ? unsafe_trunc(T, v) :

0 commit comments

Comments
 (0)