mirror of https://github.com/status-im/NimYAML.git
parent
7942e0a650
commit
3e2f92c753
|
@ -297,9 +297,13 @@ proc constructObject*[T: float|float32|float64](
|
||||||
let hint = guessType(item.scalarContent)
|
let hint = guessType(item.scalarContent)
|
||||||
case hint
|
case hint
|
||||||
of yTypeFloat:
|
of yTypeFloat:
|
||||||
discard parseBiggestFloat(item.scalarContent, result)
|
var res: BiggestFloat
|
||||||
|
discard parseBiggestFloat(item.scalarContent, res)
|
||||||
|
result = res
|
||||||
of yTypeInteger:
|
of yTypeInteger:
|
||||||
discard parseBiggestFloat(item.scalarContent, result)
|
var res: BiggestFloat
|
||||||
|
discard parseBiggestFloat(item.scalarContent, res)
|
||||||
|
result = res
|
||||||
of yTypeFloatInf:
|
of yTypeFloatInf:
|
||||||
if item.scalarContent[0] == '-': result = NegInf
|
if item.scalarContent[0] == '-': result = NegInf
|
||||||
else: result = Inf
|
else: result = Inf
|
||||||
|
|
Loading…
Reference in New Issue