1
1
diff --git a/xtask/src/codegen/grammar.rs b/xtask/src/codegen/grammar.rs
2
- index e7534582f2..8bc9237737 100644
2
+ index e7534582f2..49c96f1be3 100644
3
3
--- a/xtask/src/codegen/grammar.rs
4
4
+++ b/xtask/src/codegen/grammar.rs
5
- @@ -3,6 +3,7 @@
5
+ @@ -3,7 +3,9 @@
6
6
//! Specifically, it generates the `SyntaxKind` enum and a number of newtype
7
7
//! wrappers around `SyntaxNode` which implement `syntax::AstNode`.
8
8
9
+ - #![allow(clippy::disallowed_types)]
9
10
+ #![allow(warnings)]
10
- #![allow(clippy::disallowed_types)]
11
+ + #![allow(clippy)]
12
+ + #![cfg_attr(any(), rustfmt::skip)]
11
13
12
14
use std::{
13
- @@ -23,7 +24,7 @@ use crate::{
15
+ collections::{BTreeSet, HashSet},
16
+ @@ -23,7 +25,7 @@ use crate::{
14
17
project_root,
15
18
};
16
19
@@ -19,7 +22,7 @@ index e7534582f2..8bc9237737 100644
19
22
use self::ast_src::{AstEnumSrc, AstNodeSrc, AstSrc, Cardinality, Field, KindsSrc};
20
23
21
24
pub(crate) fn generate(check: bool) {
22
- @@ -624,7 +625 ,7 @@ fn pluralize(s: &str) -> String {
25
+ @@ -624,7 +626 ,7 @@ fn pluralize(s: &str) -> String {
23
26
}
24
27
25
28
impl Field {
@@ -28,7 +31,7 @@ index e7534582f2..8bc9237737 100644
28
31
matches!(self, Field::Node { cardinality: Cardinality::Many, .. })
29
32
}
30
33
fn token_kind(&self) -> Option<proc_macro2::TokenStream> {
31
- @@ -636,7 +637 ,7 @@ impl Field {
34
+ @@ -636,7 +638 ,7 @@ impl Field {
32
35
_ => None,
33
36
}
34
37
}
@@ -37,7 +40,7 @@ index e7534582f2..8bc9237737 100644
37
40
match self {
38
41
Field::Token(name) => {
39
42
let name = match name.as_str() {
40
- @@ -682,7 +683 ,7 @@ impl Field {
43
+ @@ -682,7 +684 ,7 @@ impl Field {
41
44
}
42
45
}
43
46
}
@@ -46,7 +49,7 @@ index e7534582f2..8bc9237737 100644
46
49
match self {
47
50
Field::Token(_) => format_ident!("SyntaxToken"),
48
51
Field::Node { ty, .. } => format_ident!("{}", ty),
49
- @@ -699,7 +700 ,7 @@ fn clean_token_name(name: &str) -> String {
52
+ @@ -699,7 +701 ,7 @@ fn clean_token_name(name: &str) -> String {
50
53
}
51
54
}
52
55
@@ -55,3 +58,16 @@ index e7534582f2..8bc9237737 100644
55
58
let mut res = AstSrc {
56
59
tokens:
57
60
"Whitespace Comment String ByteString CString IntNumber FloatNumber Char Byte Ident"
61
+ diff --git a/xtask/src/codegen/grammar/ast_src.rs b/xtask/src/codegen/grammar/ast_src.rs
62
+ index 9269d15423..babe7ca1bf 100644
63
+ --- a/xtask/src/codegen/grammar/ast_src.rs
64
+ +++ b/xtask/src/codegen/grammar/ast_src.rs
65
+ @@ -1,5 +1,8 @@
66
+ //! Defines input for code generation process.
67
+
68
+ + #![allow(clippy)]
69
+ + #![cfg_attr(any(), rustfmt::skip)]
70
+ +
71
+ use quote::ToTokens;
72
+
73
+ use crate::codegen::grammar::to_upper_snake_case;
0 commit comments