diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2023-04-24 17:16:33 +0200 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2023-04-24 17:16:33 +0200 |
commit | c2c030153b1ef86ccdbbd9aacb88caef472f55d6 (patch) | |
tree | 6f7671b89e611f4b7fa643d63021b957a800f388 /src | |
parent | cdbf2fd0587131c1b9427bbf040e3f3f7405fa72 (diff) |
Update
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/repr/anatar.ml | 2 | ||||
-rw-r--r-- | src/lib/repr/rousseau.ml | 16 | ||||
-rw-r--r-- | src/lib/repr/telcontar.ml | 4 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/repr/anatar.ml b/src/lib/repr/anatar.ml index cca6162..1bafbff 100644 --- a/src/lib/repr/anatar.ml +++ b/src/lib/repr/anatar.ml @@ -1,4 +1,4 @@ -module T = Tengwar +module T = Rousseau (** Glyph position for the diacritc *) type position = diff --git a/src/lib/repr/rousseau.ml b/src/lib/repr/rousseau.ml index f9fde05..5fff1cf 100644 --- a/src/lib/repr/rousseau.ml +++ b/src/lib/repr/rousseau.ml @@ -82,13 +82,18 @@ let add_voyel_to_glyph | `Below -> { g with tehta_below = Some v } type 'a t = - | Consonant of 'a consonant - | Voyel of 'a voyel - | Application of ('a t -> 'a t list) + | Consonant: 'a consonant -> 'a t + | Voyel: 'a voyel -> 'a t + | Application: ('a t -> 'a t list) -> 'a t | Repr of string - | Glyph of 'a glyph + | Glyph: 'a glyph -> 'a t | Nothing +let voyel + : position_type -> ('a -> string) -> 'a t + = fun position app -> + Voyel { position ; app } + let none = Nothing let space s = Repr s @@ -144,8 +149,7 @@ let fold | [] -> begin match init with | None -> () - | Some glyph -> - repr_glyph ~portant glyph buff + | Some glyph -> repr_glyph ~portant glyph buff end | hd::tl -> match init, hd with diff --git a/src/lib/repr/telcontar.ml b/src/lib/repr/telcontar.ml index 219fa46..ad1f49d 100644 --- a/src/lib/repr/telcontar.ml +++ b/src/lib/repr/telcontar.ml @@ -1,4 +1,4 @@ -module T = Tengwar +module T = Rousseau (** Glyph position for the diacritc *) type position = unit @@ -12,7 +12,7 @@ let a' = { T.position = `Above ; T.app = fun () -> "" } -let a = T.Voyel a' +let a = T.voyel `Above (fun () -> "") let app_e = fun () -> "" and app_eu = fun () -> "" |