aboutsummaryrefslogtreecommitdiff
path: root/xtask
diff options
context:
space:
mode:
Diffstat (limited to 'xtask')
-rw-r--r--xtask/src/codegen/gen_syntax.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index 879f0243e..32afd47bc 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -69,8 +69,8 @@ fn generate_ast(grammar: AstSrc<'_>) -> Result<String> {
69 } 69 }
70 70
71 impl std::fmt::Display for #name { 71 impl std::fmt::Display for #name {
72 fn fmt(..) -> std::fmt::Result { 72 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
73 std::fmt::Display::fmt(self.syntax()) 73 std::fmt::Display::fmt(self.syntax(), f)
74 } 74 }
75 } 75 }
76 76
@@ -120,6 +120,12 @@ fn generate_ast(grammar: AstSrc<'_>) -> Result<String> {
120 } 120 }
121 )* 121 )*
122 122
123 impl std::fmt::Display for #name {
124 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
125 std::fmt::Display::fmt(self.syntax(), f)
126 }
127 }
128
123 impl AstNode for #name { 129 impl AstNode for #name {
124 fn can_cast(kind: SyntaxKind) -> bool { 130 fn can_cast(kind: SyntaxKind) -> bool {
125 match kind { 131 match kind {