Skip to content

Commit

Permalink
Added mapOf
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Dec 30, 2023
1 parent 55f5d39 commit 8f61287
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ object Parsers {
/**
* An identity [Parser] for nullable doubles.
*/
val nullableDouble : Parser<Double?, Double?, Nothing> = Parser()
val nullableDouble: Parser<Double?, Double?, Nothing> = Parser()

/**
* An identity [Parser] for nullable floats.
*/
val nullableFloat : Parser<Double?, Double?, Nothing> = Parser()
val nullableFloat: Parser<Double?, Double?, Nothing> = Parser()

fun <K, V> mapOf() = Parser<Map<K, V>>()

/**
* A [Parser] for nullable types, which returns the input if not null, or an error if null.
Expand Down

0 comments on commit 8f61287

Please sign in to comment.