package ocamlformat-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a with_comments = {
  1. ast : 'a;
  2. comments : Cmt.t Ocamlformat_stdlib.list;
  3. prefix : Ocamlformat_stdlib.string;
  4. source : Source.t;
}
module W : sig ... end
val parse : ?disable_w50:Ocamlformat_stdlib.bool -> ?disable_deprecated:Ocamlformat_stdlib.bool -> ('b -> input_name:Ocamlformat_stdlib.string -> Ocamlformat_stdlib.string -> 'a) -> 'b -> Conf.t -> input_name:Ocamlformat_stdlib.string -> source:Ocamlformat_stdlib.string -> 'a with_comments
  • raises [Warning50]

    on misplaced documentation comments.

val parse_toplevel : ?disable_w50:Ocamlformat_stdlib.bool -> ?disable_deprecated:Ocamlformat_stdlib.bool -> Conf.t -> input_name:Ocamlformat_stdlib.string -> source:Ocamlformat_stdlib.string -> (Extended_ast.use_file with_comments, Extended_ast.repl_file with_comments) Ocamlformat_stdlib.Either.t

Variant of parse that uses Extended_ast.Parse.toplevel. This function handles conf.parse_toplevel_phrases.

val parse_ast : Conf.t -> 'a Extended_ast.t -> input_name:Ocamlformat_stdlib.string -> Ocamlformat_stdlib.string -> 'a

Argument to parse.

OCaml

Innovation. Community. Security.