mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
Simplify char pattern matching in json parser
This commit is contained in:
parent
7064d1c060
commit
262d13ffe7
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue