Skip to main content

read_grid

Function read_grid 

Source
pub fn read_grid<'t>(
    node: &NodeRef<'t, Flm>,
    styles: &Styles,
) -> Result<Grid<'t>, LowerError>
Expand description

Reads the table of cells node — a cells environment — against the style declarations styles.

The names of the rows and the columns are read first, then every instruction of the body, in order. This function reports nothing: each problem it finds is returned in Grid::problems with the Error to report and, where something was left out, the dropped mark to place, and the rule that calls it reports them; diagnostics states the recovery for each. The table itself is never refused. A node with no body gives a grid with no cells, whose only problem is Empty. Characters are read through chars_at_lowering, the only way a rule reads characters at lowering.

§Errors

LowerError::PlaceholderCharacters where a placement, a mapping, a styles argument, a \merge range or a list of names holds a placeholder of a user definition’s template that is lowered without being expanded: its characters are not known until the template is expanded.