Skip to main content

Crate draxl_printer

Crate draxl_printer 

Source
Expand description

Canonical printer for Draxl.

This crate has two responsibilities:

  • canonicalize AST containers so ranked children and attached trivia are in deterministic order
  • render the canonical tree back into compact Draxl surface syntax

Keeping those steps separate makes it easier to reason about whether a change affects semantic ordering, textual formatting, or both.

Functionsยง

canonicalize_file
Returns a canonicalized clone of the file.
print_file
Prints a file into canonical Draxl source.