aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/gen_syntax.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index 19d5594f5..745a25862 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -40,7 +40,7 @@ fn generate_tokens(grammar: AstSrc<'_>) -> Result<String> {
40 pub(crate) syntax: SyntaxToken, 40 pub(crate) syntax: SyntaxToken,
41 } 41 }
42 impl std::fmt::Display for #name { 42 impl std::fmt::Display for #name {
43 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 43 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
44 std::fmt::Display::fmt(&self.syntax, f) 44 std::fmt::Display::fmt(&self.syntax, f)
45 } 45 }
46 } 46 }
@@ -68,7 +68,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: AstSrc<'_>) -> Result<String> {
68 .iter() 68 .iter()
69 .map(|node| { 69 .map(|node| {
70 let name = format_ident!("{}", node.name); 70 let name = format_ident!("{}", node.name);
71 let kind = format_ident!("{}", to_upper_snake_case(&name.to_string())); 71 let kind = format_ident!("{}", to_upper_snake_case(node.name));
72 let traits = node.traits.iter().map(|trait_name| { 72 let traits = node.traits.iter().map(|trait_name| {
73 let trait_name = format_ident!("{}", trait_name); 73 let trait_name = format_ident!("{}", trait_name);
74 quote!(impl ast::#trait_name for #name {}) 74 quote!(impl ast::#trait_name for #name {})
@@ -199,7 +199,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: AstSrc<'_>) -> Result<String> {
199 enum_names.chain(node_names.clone()).map(|it| format_ident!("{}", it)).map(|name| { 199 enum_names.chain(node_names.clone()).map(|it| format_ident!("{}", it)).map(|name| {
200 quote! { 200 quote! {
201 impl std::fmt::Display for #name { 201 impl std::fmt::Display for #name {
202 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 202 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
203 std::fmt::Display::fmt(self.syntax(), f) 203 std::fmt::Display::fmt(self.syntax(), f)
204 } 204 }
205 } 205 }