Skip to main content

carry_rule_docs

Function carry_rule_docs 

Source
pub fn carry_rule_docs(
    target: Grammar,
    source: &Grammar,
    rename: &dyn Fn(&str) -> String,
) -> Grammar
Expand description

Copies the documentation of every rule of source onto the rule of target that rename names it.

As the JavaScript carryRuleDocs does, a rule of source without documentation, or one target lacks, changes nothing.