aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
authorIgor Aleksanov <[email protected]>2020-08-10 13:05:01 +0100
committerIgor Aleksanov <[email protected]>2020-08-10 13:05:01 +0100
commit6344a7f362b19eaf71547766135ece160aa3389e (patch)
tree53dc390d807291f62c1f249f571b36b760e096f5 /xtask/src
parentf3336509e52187a7a70a8043557a7317872e3a2f (diff)
Fix clippy warnings
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/codegen/gen_syntax.rs20
1 files changed, 9 insertions, 11 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index cafad8070..af9d63b06 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -91,18 +91,16 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> Result<String> {
91 support::children(&self.syntax) 91 support::children(&self.syntax)
92 } 92 }
93 } 93 }
94 } else { 94 } else if let Some(token_kind) = field.token_kind() {
95 if let Some(token_kind) = field.token_kind() { 95 quote! {
96 quote! { 96 pub fn #method_name(&self) -> Option<#ty> {
97 pub fn #method_name(&self) -> Option<#ty> { 97 support::token(&self.syntax, #token_kind)
98 support::token(&self.syntax, #token_kind)
99 }
100 } 98 }
101 } else { 99 }
102 quote! { 100 } else {
103 pub fn #method_name(&self) -> Option<#ty> { 101 quote! {
104 support::child(&self.syntax) 102 pub fn #method_name(&self) -> Option<#ty> {
105 } 103 support::child(&self.syntax)
106 } 104 }
107 } 105 }
108 } 106 }