Skip to main content

default_rules

Function default_rules 

Source
pub fn default_rules() -> Vec<LoweringRule>
Expand description

The six default rules of this module, one per structural element that needs a rule, as values a feature can register; the lowering feature registers them.

§Examples

use flm_core::stdlib::backends::lowering::{PARAGRAPH_RULE, default_rules};

let names: Vec<String> =
    default_rules().iter().map(|rule| rule.name.to_string()).collect();
assert_eq!(names.len(), 6);
assert!(names.contains(&PARAGRAPH_RULE.to_string()));