Skip to content

Commit

Permalink
Fix the Angstrom.Buffered.state_to_option docstring
Browse files Browse the repository at this point in the history
The docstring claimed to return `Some (bs, v)` when in reality it returns `Some v`
  • Loading branch information
Antonio Nuno Monteiro authored Feb 24, 2019
1 parent 3a3e245 commit 6e482ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/angstrom.mli
Original file line number Diff line number Diff line change
Expand Up @@ -535,12 +535,12 @@ module Buffered : sig
copied into the state's buffer for later use by the caller. *)

val state_to_option : 'a state -> 'a option
(** [state_to_option state] returns [Some (bs, v)] if the parser is in the
(** [state_to_option state] returns [Some v] if the parser is in the
[Done (bs, v)] state and [None] otherwise. This function has no effect on
the current state of the parser. *)

val state_to_result : 'a state -> ('a, string) result
(** [state_to_result state] returns [Ok v] if the parser is in the [Done v]
(** [state_to_result state] returns [Ok v] if the parser is in the [Done (bs, v)]
state and [Error msg] if it is in the [Fail] or [Partial] state.
This function has no effect on the current state of the parser. *)
Expand Down

0 comments on commit 6e482ee

Please sign in to comment.