Simplify char pattern matching in json parser

This commit is contained in:
Ayaz Hafiz 2022-10-03 16:04:55 -05:00
parent 7064d1c060
commit 262d13ffe7
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -197,7 +197,7 @@ takeFloat = \bytes ->
{ taken: intPart, rest } = takeDigits bytes
when List.get rest 0 is
Ok 46 -> # 46 = .
Ok '.' ->
{ taken: floatPart, rest: afterAll } = takeDigits (List.split rest 1).others
builtFloat =
List.concat (List.append intPart '.') floatPart