Module Dune_lang
module Atom : sig ... endmodule Syntax : sig ... endtype syntax= Syntax.t=|Jbuild|Dune
module Template : sig ... endtype t=|Atom of Atom.t|Quoted_string of string|List of t list|Template of Template.tThe S-expression type
val atom : string -> tatom sconvert the stringsto an Atom.- raises Invalid_argument
if
sdoes not satisfyAtom.is_valid s.
val atom_or_quoted_string : string -> tval unsafe_atom_of_string : string -> tval to_string : t -> syntax:syntax -> stringSerialize a S-expression
val pp : syntax -> Stdlib.Format.formatter -> t -> unitSerialize a S-expression using indentation to improve readability
val pp_quoted : Stdlib.Format.formatter -> t -> unitSerialization that never fails because it quotes atoms when necessary TODO remove this once we have a proper sexp type
val pp_split_strings : Stdlib.Format.formatter -> t -> unitSame as
pp ~syntax:Dune, but split long strings. The formatter must have been prepared withprepare_formatter.
val prepare_formatter : Stdlib.Format.formatter -> unitPrepare a formatter for
pp_split_strings. Additionaly the formatter escape newlines when the tags "makefile-action" or "makefile-stuff" are active.
val add_loc : t -> loc:Stdune.Loc.t -> Ast.t
module Cst : sig ... endConcrete syntax tree
val insert_comments : Cst.t list -> (Stdune.Loc.t * Cst.Comment.t) list -> Cst.t listInsert comments in a concrete syntax tree. Comments are inserted based on their location.
module Parse_error : sig ... endexceptionParse_error of Parse_error.tException raised in case of a parsing error
module Lexer : sig ... endmodule Parser : sig ... endval parse_string : fname:string -> mode:'a Parser.Mode.t -> ?lexer:Lexer.t -> string -> 'aval parse_cst_string : fname:string -> ?lexer:Lexer.t -> string -> Cst.t list
module Decoder : sig ... endmodule type Conv = sig ... endval to_sexp : t Stdune.Sexp.Encoder.t
module Io : sig ... end