Skip to content

Commit

Permalink
putting char later in the parsers
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolanrensen committed Oct 3, 2024
1 parent c0d76ca commit bf2a938
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,6 @@ internal object Parsers : GlobalParserOptions {
}

private val parsersOrder = listOf(
// Char
stringParser<Char> { it.singleOrNull() },
// Int
stringParser<Int> { it.toIntOrNull() },
// Long
Expand Down Expand Up @@ -412,6 +410,8 @@ internal object Parsers : GlobalParserOptions {
null
}
},
// Char
stringParser<Char> { it.singleOrNull() },
// No parser found, return as String
// must be last in the list of parsers to return original unparsed string
stringParser<String> { it },
Expand Down

0 comments on commit bf2a938

Please sign in to comment.