minor: generated code readability

This commit is contained in:
Aleksey Kladov 2021-10-02 15:20:03 +03:00
parent a6e6f9c58b
commit f3a1ff786f

View file

@ -318,7 +318,8 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> String {
}
}
sourcegen::add_preamble("sourcegen_ast", sourcegen::reformat(res))
let res = sourcegen::add_preamble("sourcegen_ast", sourcegen::reformat(res));
res.replace("#[derive", "\n#[derive")
}
fn write_doc_comment(contents: &[String], dest: &mut String) {