tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Syntax: the formatter is a pretty printer (ADR 0059)

`louise fmt` is now a real pretty printer over the CST (a Wadler-style
document algebra in louise_syntax::pretty), with fixed rules and no
settings: 80 columns, two-space indents, fits-or-breaks-fully groups,
broken lists that lead with the comma aligned with the brackets, chains
that break before the operator, comments that keep their place and force
breaks, strings/templates/HTML text untouched.

Two normalizations go beyond whitespace: a trailing comma before a
closing bracket is dropped in leading-comma lists (a one-element tuple
keeps its meaningful comma), and an empty `{ }` after a type name is
dropped. The second is a language change: a bodyless type is now an
empty ADT for exhaustiveness (matchable with no arms), unless it is
@builtin (Int, String stay inhabited).

The safety net grows: formatting is refused on syntax errors, on a
significant-token mismatch after reparsing, and on a comment mismatch
(comments are compared, in order; they may slide across a comma).

Tooling fallout:
- tests/ui pins diagnostics to lines: the harness grows a bless mode,
  LOUISE_UI_BLESS=1 cargo test -p louise_db --test ui, which re-places
  the //~ markers and reformats the file.
- louise bindgen formats its output: generated bindings are canonical.
- gen-tuple-impls.py runs its block through louise fmt.

olivier · il y a 1 mois · 8076febbe7b33670d2a452afcc230ce683e01eb0

Parents 2cf84ce

15 fichiers modifiés, 2552 ajouts, 194 suppressions