mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 19:47:15 +03:00
11 lines
359 B
Plaintext
11 lines
359 B
Plaintext
Parser.char
|
|
: (Parser Char)
|
|
= λcode
|
|
let P = λx(Parser.Result Char)
|
|
let cons = λhead λtail
|
|
let P = λx(Parser.Result Char)
|
|
let true = (Parser.Result.done Char tail head) // TODO
|
|
let false = (Parser.Result.done Char tail head)
|
|
(~(Char.is_slash head) P true false)
|
|
let nil = (Parser.Result.fail Char "eof")
|
|
(~code P cons nil) |