diff --git a/src/sexp/CCSexp.ml b/src/sexp/CCSexp.ml index 65f1ccd0..54345c49 100644 --- a/src/sexp/CCSexp.ml +++ b/src/sexp/CCSexp.ml @@ -1,4 +1,3 @@ - (* This file is free software, part of containers. See file "license" for more details. *) (** {1 Simple S-expression parsing/printing} *) @@ -365,3 +364,5 @@ include (Make(struct (*$Q & ~count:100 sexp_gen (fun s -> sexp_valid s ==> (to_string s |> parse_string = Result.Ok s)) *) + +let atom s : t = `Atom s diff --git a/src/sexp/CCSexp.mli b/src/sexp/CCSexp.mli index 2a1c27a6..54467f2d 100644 --- a/src/sexp/CCSexp.mli +++ b/src/sexp/CCSexp.mli @@ -1,4 +1,3 @@ - (* This file is free software, part of containers. See file "license" for more details. *) (** {1 Handling S-expressions} *) @@ -34,3 +33,6 @@ type t = [ ] include S with type t := t + +val atom : string -> t +(** Build an atom directly from a string. *)