package wax-lib

All checked builds pass
  1. Overview
  2. Docs
Libraries for Wax, a Rust-like syntax for WebAssembly

Install

dune-project
 Dependency

Authors

Maintainers

Sources

wax-v0.3.0.tbz
sha256=cc19989d0db930d9300d7356c8f127309424a82767dd3c91ffd19a0bfd20e3a6
sha512=14ff9219dc6c4e8855c3cb895bd1af6fd81d1c521afefe1e7f69208a2e37abc7ec0946f188198a26780aa405fd43a526b938158334a019f7a5d991d8efc437c3

doc/wax-lib.utils/Wax_utils/Parsing/Make_parser/index.html

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:Colors.flag -> filename:string -> unit -> Output.t * Trivia.context

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

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

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

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

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