Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Max Große <max12.gro@gmail.com>
  • Loading branch information
maxRN committed Jul 31, 2024
1 parent 212e62b commit e7024d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions otherlibs/configurator/src/dune_lang.ml
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ end

type t =
| Quoted_string of string
| Block_string of string
(* TODO(maxrn): Why no Block_string here? *)
| List of t list

let rec to_string t =
match t with
| Quoted_string s -> Escape.quoted s
(* TODO(maxrn): should we do something here?? *)
| Block_string s -> Escape.quoted s
| List l -> Printf.sprintf "(%s)" (List.map l ~f:to_string |> String.concat ~sep:" ")
;;
1 change: 1 addition & 0 deletions otherlibs/configurator/src/dune_lang.mli
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(** Subset of dune_lang to print flag lists *)
type t =
| Quoted_string of string
| Block_string of string
| List of t list

val to_string : t -> string
1 change: 1 addition & 0 deletions src/dune_sexp/t.ml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type t =
| List of t list
| Template of Template.t

(* TODO(maxrn): could this also be a Block_string ? *)
let atom_or_quoted_string s =
if Atom.is_valid s then Atom (Atom.of_string s) else Quoted_string s
;;
Expand Down

0 comments on commit e7024d4

Please sign in to comment.