package ocamlformat-lib
Module Ocamlformat_lib.Parse_with_commentsSource
Source
type 'a with_comments = {ast : 'a;comments : Cmt.t Ocamlformat_stdlib.list;prefix : Ocamlformat_stdlib.string;source : Source.t;
}Source
exception Warning50 of (Ocamlformat_ocaml_common.Location.t
* Ocamlformat_ocaml_common.Warnings.t)
Ocamlformat_stdlib.listSource
val parse :
?disable_w50:Ocamlformat_stdlib.bool ->
?disable_deprecated:Ocamlformat_stdlib.bool ->
('b ->
ocaml_version:Ocaml_version.t ->
input_name:Ocamlformat_stdlib.string ->
Ocamlformat_stdlib.string ->
'a) ->
'b ->
Conf.t ->
input_name:Ocamlformat_stdlib.string ->
source:Ocamlformat_stdlib.string ->
'a with_commentsSource
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.tVariant of parse that uses Extended_ast.Parse.toplevel. This function handles conf.parse_toplevel_phrases.
Source
val parse_ast :
Conf.t ->
'a Extended_ast.t ->
ocaml_version:Ocaml_version.t ->
input_name:Ocamlformat_stdlib.string ->
Ocamlformat_stdlib.string ->
'aArgument to parse.