Skip to main content

Module formatting

Module formatting 

Source
Expand description

Lemma source code formatting.

Formats parsed specs into canonical Lemma source text. Uses AsLemmaSource and Expression::Display for syntax; this module handles layout only.

Constants§

MAX_COLS
Soft line length limit. Longer lines may be wrapped (unless clauses, expressions). Data and other constructs are not broken if they exceed this. 56 has been chosen to fit on an average mobile screen with an 11pt font.

Functions§

format_parse_result
Format a ParseResult (repository groups + specs) into canonical Lemma source.
format_source
Parse a source string and format it to canonical Lemma source.
format_specs
Format a sequence of parsed specs into canonical Lemma source.