Skip to main content

Module pretty

Module pretty 

Source
Expand description

Pretty printer for field/material/law declarations (W16).

Formats VibeScript declarations in a canonical, readable style. This is CST sugar — it uses the trivia module to preserve comments and whitespace, so round-tripping through the pretty printer doesn’t destroy commentary.

§Style

field pressure_ambient: Pressure
  unit: <qudt:KiloPascal>
  support: region
  representation: grid;

material steel: Material
  yield: 250.0,
  density: 7850.0;

law crush
  when pressure_ambient > steel.yield
  => 1;

Reference: docs/vibescript-full-impl-PLAN.md wish list W16.

Structs§

PrettyDocument
A document of pretty-printable declarations.
PrettyField
A pretty-printable field declaration.
PrettyLaw
A pretty-printable law declaration.
PrettyMaterial
A pretty-printable material declaration.
PrettyOptions
Pretty-print options.