Rename FnDef -> Fn

This commit is contained in:
Aleksey Kladov 2020-07-30 14:51:08 +02:00
parent 3e1e6227ca
commit 1142112c70
244 changed files with 683 additions and 675 deletions

View file

@ -471,6 +471,7 @@ impl Field {
"::" => "coloncolon",
"#" => "pound",
"?" => "question_mark",
"," => "comma",
_ => name,
};
format_ident!("{}_token", name)
@ -599,13 +600,9 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, rule: &Rule) {
}
}
// (T (',' T)* ','?)?
// (T (',' T)* ','?)
fn lower_comma_list(acc: &mut Vec<Field>, grammar: &Grammar, rule: &Rule) -> bool {
let rule = match rule {
Rule::Opt(it) => it,
_ => return false,
};
let rule = match &**rule {
Rule::Seq(it) => it,
_ => return false,
};