Module Parsing.Make_parserSource

Make plus a fast parser, whose only role is speed on the happy path: parse_from_string tries it and, on a syntax error, falls back to the core's incremental parser to produce the message. Same result signature as Make. The CLI uses this; an in-process consumer can use Make directly.

Parameters

module Output : sig ... end
module Tokens : sig ... end
module _ : sig ... end
module _ : sig ... end
module _ : sig ... end
module _ : sig ... end

Signature

Sourceval parse : ?color:Wax_utils.Colors.flag -> filename:string -> unit -> Output.t * Wax_utils.Trivia.context

As Make.parse, using the fast parser on the happy path.

Sourceval parse_from_string : ?color:Wax_utils.Colors.flag -> filename:string -> string -> Output.t * Wax_utils.Trivia.context

As Make.parse_from_string, using the fast parser on the happy path.

Sourceval parse_diagnostics : filename:string -> string -> (Output.t * Wax_utils.Trivia.context, syntax_error) result
Sourceval parse_recover : filename:string -> sync:(Tokens.token -> sync_class) -> ?insert:(Tokens.token * Wax_utils.Message.t) list -> ?closers:Tokens.token list -> ?barrier:(Tokens.token * (Tokens.token -> bool) * (Tokens.token -> bool)) -> string -> Output.t option * syntax_error list * Wax_utils.Trivia.context

As Make.parse_recover. (Recovery always uses the incremental engine; there is no fast-path variant.)