|
384 | 384 | end
|
385 | 385 | parse!(q.next, io, r; kwargs...)
|
386 | 386 | # @debug "Quoted - $T: result.code=$(result.code), result.result=$(result.result)"
|
387 |
| - quoted && (setfield!(r, 3, pos); handlequoted!(q, io, r)) |
| 387 | + quoted && (setfield!(r, 3, Int(pos)); handlequoted!(q, io, r)) |
388 | 388 | return r
|
389 | 389 | end
|
390 | 390 |
|
|
419 | 419 |
|
420 | 420 | @inline function parse!(s::Strip, io::IO, r::Result{T}; kwargs...) where {T}
|
421 | 421 | # @debug "xparse Strip - $T"
|
422 |
| - pos = position(io) |
| 422 | + pos = Int(position(io)) |
423 | 423 | stripped = wh!(io, s.wh1, s.wh2)
|
424 | 424 | parse!(s.next, io, r; kwargs...)
|
425 | 425 | # @debug "Strip - $T: result.code=$(result.code), result.result=$(result.result), result.b=$(result.b)"
|
@@ -472,7 +472,7 @@ const TEN = UInt8('9')+UInt8(1)
|
472 | 472 | @inline function defaultparser(io::IO, r::Result{T}; kwargs...) where {T <: Integer}
|
473 | 473 | # @debug "xparse Int"
|
474 | 474 | setfield!(r, 1, missing)
|
475 |
| - setfield!(r, 3, position(io)) |
| 475 | + setfield!(r, 3, Int(position(io))) |
476 | 476 | # r.result = missing
|
477 | 477 | eof(io) && (r.code |= INVALID | EOF; return r)
|
478 | 478 | v = zero(T)
|
@@ -516,14 +516,14 @@ const BOOLS = Trie(["true"=>true, "false"=>false])
|
516 | 516 |
|
517 | 517 | @inline function defaultparser(io::IO, r::Result{Bool}; bools::Trie=BOOLS, kwargs...)
|
518 | 518 | setfield!(r, 1, missing)
|
519 |
| - setfield!(r, 3, position(io)) |
| 519 | + setfield!(r, 3, Int(position(io))) |
520 | 520 | if !match!(bools, io, r)
|
521 | 521 | r.code |= INVALID
|
522 | 522 | end
|
523 | 523 | return r
|
524 | 524 | end
|
525 | 525 |
|
526 |
| -defaultparser(io::IO, r::Result{Missing}; kwargs...) = (setfield!(r, 3, position(io)); return r) |
527 |
| -defaultparser(io::IO, r::Result{Union{}}; kwargs...) = (setfield!(r, 3, position(io)); return r) |
| 526 | +defaultparser(io::IO, r::Result{Missing}; kwargs...) = (setfield!(r, 3, Int(position(io))); return r) |
| 527 | +defaultparser(io::IO, r::Result{Union{}}; kwargs...) = (setfield!(r, 3, Int(position(io))); return r) |
528 | 528 |
|
529 | 529 | end # module
|
0 commit comments