add_sub_grammar

Function add_sub_grammar 

Source
pub fn add_sub_grammar(
    builder: &mut GrammarBuilder,
    sub_grammar: &GrammarData,
) -> i32
Expand description

Splice every rule of sub_grammar into builder, returning the new rule id of sub_grammar’s root rule. Rule references, repeats and tag dispatches are remapped to the freshly-allocated rule ids.