@@ -4,8 +4,6 @@ using Mmap
4
4
using .. Common
5
5
import Parsers
6
6
7
- include (" pushvector.jl" )
8
-
9
7
"""
10
8
Like `isspace`, but work on bytes and includes only the four whitespace
11
9
characters defined by the JSON standard: space, tab, line feed, and carriage
@@ -33,9 +31,9 @@ mutable struct StreamingParserState{T <: IO} <: ParserState
33
31
io:: T
34
32
cur:: UInt8
35
33
used:: Bool
36
- utf8array:: PushVector{UInt8, Vector{UInt8} }
34
+ utf8array:: Vector{UInt8}
37
35
end
38
- StreamingParserState (io:: IO ) = StreamingParserState (io, 0x00 , true , PushVector { UInt8} () )
36
+ StreamingParserState (io:: IO ) = StreamingParserState (io, 0x00 , true , UInt8[] )
39
37
40
38
struct ParserContext{DictType, IntType, AllowNanInf, NullValue} end
41
39
318
316
Parse a float from the given bytes vector, starting at `from` and ending at the
319
317
byte before `to`. Bytes enclosed should all be ASCII characters.
320
318
"""
321
- float_from_bytes (bytes:: PushVector , from:: Int , to:: Int ) = _float_from_bytes (bytes. v, from, to)
322
- float_from_bytes (bytes:: MemoryParserState , from:: Int , to:: Int ) = _float_from_bytes (bytes. utf8, from, to)
319
+ float_from_bytes (bytes:: MemoryParserState , from:: Int , to:: Int ) = float_from_bytes (bytes. utf8, from, to)
323
320
324
- function _float_from_bytes (bytes, from:: Int , to:: Int ):: Union{Float64,Nothing}
321
+ function float_from_bytes (bytes:: Union{String, Vector{UInt8}} , from:: Int , to:: Int ):: Union{Float64,Nothing}
325
322
# Would like to use tryparse, but we want it to consume the full input,
326
323
# and the version in Parsers does not do this.
327
324
0 commit comments