Skip to content

Commit

Permalink
Add an internal documentation about ldh-str token
Browse files Browse the repository at this point in the history
  • Loading branch information
dinosaure committed Jul 26, 2021
1 parent a2c706f commit 916ecf7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/domain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ module Decoder = struct

let let_dig = satisfy (is_alpha or is_digit)

(* XXX(dinosaure): Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig
* and Let-dig = ALPHA / DIGIT
*
* This [ldh_str] does not strictly follow the definition but just
* eats [*( ALPHA / DIGIT / "-" )] and check that the last character
* **is not** a dash. *)
let ldh_str =
take_while1 (is_alpha or is_digit or is_dash) >>= fun res ->
if String.get res (String.length res - 1) <> '-'
Expand Down

0 comments on commit 916ecf7

Please sign in to comment.