Program Style
Canonical formatting
adam fmt, backed by format_sheet, applies
one canonical layout: four-space indentation, opening braces on the keyword’s line,
and no space before a declaration’s closing ;:
sheet s {
cell x: i32 = 1;
cell y: i32 = 2;
}
Formatting is idempotent: formatting canonical source leaves it unchanged.
It preserves comments, doc comments, and blank lines in their original positions,
including before sheet and before closing braces.
The language server refuses formatting when syntax errors are recorded.
Callers of format_sheet must supply a sheet with an empty sheet.errors list.
Commas separate list items; they do not terminate lists. Only singleton tuple values, types and destructuring bindings require a terminal comma to distinguish them from grouping. Conditional branches have no comma separator or terminator.