Skip to main content

capture_grammar_layout

Function capture_grammar_layout 

Source
pub fn capture_grammar_layout(
    source: &str,
    format: &str,
    grammar: &Grammar,
) -> Result<GrammarLayout, GrammarLosslessError>
Expand description

The layout of source for grammar, the grammar imported from it: its definitions with the fingerprints of their rules, and the fingerprints of the rules defined nowhere in the source.

ยงErrors

Returns GrammarLosslessError::UnsupportedFormat for a format outside GRAMMAR_LOSSLESS_FORMATS and a layout error for malformed JSON.