package wax-lib

  1. Overview
  2. Docs
Libraries for Wax, a Rust-like syntax for WebAssembly

Install

dune-project
 Dependency

Authors

Maintainers

Sources

wax-v0.2.0.tbz
sha256=4361e1324b7754a4c08ab5b505df32061f3ce0cea60443fd0d3699e0fa796b32
sha512=fcc756d2f160ba90a9aa1131f2ab22ed7f45466ccd658c21cf9df6868a6aab0cee7f404719d698a379958802f9820398f2fe0685ecc4dda018ca4f653294e39b

doc/wax-lib.wasm/Wax_wasm/Output/index.html

Module Wax_wasm.OutputSource

Pretty-printing for Wasm Text Format.

Sourceval id_string : string -> string

id_string x is the source text of the identifier whose name (without the leading $) is x: $x for a plain identifier, or the quoted $"…" form with escaping otherwise. This is how module_ renders identifiers.

Sourcetype document

A module laid out into the printer's intermediate tree. Building it for a large module allocates heavily, so a caller that needs both the dry trivia-collection pass and the real emit should prepare it once and drive both off the result.

Lay a module out into its intermediate document. Pure; no printing.

collect doc set records every location emit doc would look up into set — the dry pass that drives Wax_utils.Trivia.associate's only argument, without laying anything out.

Sourceval emit : ?color:Wax_utils.Colors.flag -> ?out_channel:out_channel -> ?tail:Wax_utils.Trivia.entry list -> Wax_utils.Printer.t -> trivia:Wax_utils.Trivia.t -> document -> unit

Render a prepared document.

prepare then emit, in one call. Convenience for a caller that renders once and needs no collect pass; one that needs both should prepare once and drive them off the result.

Sourceval subtype_string : (Ast.Text.name option * Ast.Text.subtype, Ast.location) Ast.annotated -> string

A type definition ((type $id …)) rendered to a plain uncoloured string, for showing on hover over a type identifier.