package wax-lib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4361e1324b7754a4c08ab5b505df32061f3ce0cea60443fd0d3699e0fa796b32
sha512=fcc756d2f160ba90a9aa1131f2ab22ed7f45466ccd658c21cf9df6868a6aab0cee7f404719d698a379958802f9820398f2fe0685ecc4dda018ca4f653294e39b
doc/wax-lib.wax/Wax_lang/Output/index.html
Module Wax_lang.OutputSource
Pretty-printing for Wax.
Target line width for Wax output (the Rust Style Guide's default of 100). Applied by run_string / run_channel; exposed for a caller that drives a printer some other way.
Wax_utils.Printer.run_string at the Wax width. Render Wax through this rather than the printer's own runners, which default to the narrower WebAssembly-text width.
Wax_utils.Printer.run_channel at the Wax width.
Render a type into a caller-supplied styled printer, so it shares a diagnostic message's colour theme and width.
val subtype :
Wax_utils.Printer.t ->
(Ast.ident * Ast.subtype, Ast.location) Ast.annotated ->
unitPrint a named type definition, type name = …;. Small definitions stay on one line.
val module_ :
?color:Wax_utils.Colors.flag ->
?out_channel:out_channel ->
?tail:Wax_utils.Trivia.entry list ->
Wax_utils.Printer.t ->
trivia:Wax_utils.Trivia.t ->
Ast.location Ast.module_ ->
unitRender a module.
collect m set records every location module_ would look up into set — the dry pass that drives Wax_utils.Trivia.associate's only argument, as Wax_wasm.Output.collect does for Wasm text. It needs no printer: the Wax printer streams straight from the AST, so the pass is a discarded render (there is no laid-out document to walk).