add signature to line_gap.sml

This commit is contained in:
2024-10-04 15:00:14 +01:00
parent 9be5d36e50
commit 014c2ef7d1

View File

@@ -1,4 +1,26 @@
structure LineGap =
signature LINE_GAP =
sig
type t =
{ idx: int
, leftStrings: string list
, rightStrings: string list
, line: int
, leftLines: int vector list
, rightLines: int vector list
}
val delete: int * int * t -> t
val empty: t
val insert: int * string * t -> t
val toString: t -> string
(* for testing *)
val verifyIndex: t -> unit
val verifyLines: t -> unit
end
structure LineGap :> LINE_GAP =
struct
local
fun helpCountLineBreaks (pos, acc, str) =