[][src]Function abnf_to_pest::escape_rulename

pub fn escape_rulename(x: &str) -> String

Escape the rule name to be a valid Rust identifier.

Replaces e.g. if with if_, and rule-name with rule_name. Also changes whitespace to whitespace_ because of https://github.com/pest-parser/pest/pull/374