text_parse/syntax.ml
fox 77bc45eb1b Applicative text parser
TODO: markdown & gemini coming

git-svn-id: https://svn.yakumo.dev/yakumo.izuru/text_parse/trunk@1 cb476dc4-a1c2-9446-a177-162899b6b847
2021-02-25 23:22:35 +00:00

11 lines
286 B
OCaml

module type S = sig
val s: Cursor.t -> char -> bool
val e: Cursor.t -> char -> bool
end
(*let str c = String.make 1 c*)
let newline = function '\n' -> true | _ -> false
let printable ch = ch >= ' ' && ch <= '~'
let letter ch = (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')