Skip to content

Commit

Permalink
Doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
toots committed Jun 27, 2023
1 parent 01b148e commit e75ea97
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/lib/sedlexing.mli
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ exception MalFormed
Uchars [a], a position [pos] and a code point count [n]. The
function should put [n] code points or less in [a], starting at
position [pos], and return the number of characters provided. A
return value of 0 means end of input. *)
return value of 0 means end of input. [bytes_per_char] argument is
optional. If unspecified, byte positions are the same as code point
position. *)
val create :
?bytes_per_char:(Uchar.t -> int) ->
(Uchar.t array -> int -> int -> int) ->
Expand All @@ -62,13 +64,16 @@ val set_position :
returned {!Lexing.position} records. *)
val set_filename : lexbuf -> string -> unit

(** Create a lexbuf from a stream of Unicode code points. *)
(** Create a lexbuf from a stream of Unicode code points. [bytes_per_char] is
optional. If unspecified, byte positions are the same as code point positions. *)
val from_gen : ?bytes_per_char:(Uchar.t -> int) -> Uchar.t Gen.t -> lexbuf

(** Create a lexbuf from an array of Unicode code points. *)
(** Create a lexbuf from an array of Unicode code points. [bytes_per_char] is
optional. If unspecified, byte positions are the same as code point positions. *)
val from_int_array : ?bytes_per_char:(Uchar.t -> int) -> int array -> lexbuf

(** Create a lexbuf from an array of Unicode code points. *)
(** Create a lexbuf from an array of Unicode code points. [bytes_per_char] is
optional. If unspecified, byte positions are the same as code point positions. *)
val from_uchar_array :
?bytes_per_char:(Uchar.t -> int) -> Uchar.t array -> lexbuf

Expand Down

0 comments on commit e75ea97

Please sign in to comment.