diff options
Diffstat (limited to 'crates')
-rw-r--r-- | crates/libsyntax2/src/grammar/items/consts.rs | 4 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/mod.rs | 14 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/structs.rs | 4 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/traits.rs | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/crates/libsyntax2/src/grammar/items/consts.rs b/crates/libsyntax2/src/grammar/items/consts.rs index b11949b49..5a5852f83 100644 --- a/crates/libsyntax2/src/grammar/items/consts.rs +++ b/crates/libsyntax2/src/grammar/items/consts.rs | |||
@@ -1,10 +1,10 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | pub(super) fn static_item(p: &mut Parser) { | 3 | pub(super) fn static_def(p: &mut Parser) { |
4 | const_or_static(p, STATIC_KW) | 4 | const_or_static(p, STATIC_KW) |
5 | } | 5 | } |
6 | 6 | ||
7 | pub(super) fn const_item(p: &mut Parser) { | 7 | pub(super) fn const_def(p: &mut Parser) { |
8 | const_or_static(p, CONST_KW) | 8 | const_or_static(p, CONST_KW) |
9 | } | 9 | } |
10 | 10 | ||
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs index c3893937a..883b5a946 100644 --- a/crates/libsyntax2/src/grammar/items/mod.rs +++ b/crates/libsyntax2/src/grammar/items/mod.rs | |||
@@ -120,7 +120,7 @@ pub(super) fn maybe_item(p: &mut Parser) -> MaybeItem { | |||
120 | // test unsafe_auto_trait | 120 | // test unsafe_auto_trait |
121 | // unsafe auto trait T {} | 121 | // unsafe auto trait T {} |
122 | TRAIT_KW => { | 122 | TRAIT_KW => { |
123 | traits::trait_item(p); | 123 | traits::trait_def(p); |
124 | TRAIT_DEF | 124 | TRAIT_DEF |
125 | } | 125 | } |
126 | 126 | ||
@@ -156,7 +156,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> { | |||
156 | EXTERN_CRATE_ITEM | 156 | EXTERN_CRATE_ITEM |
157 | } | 157 | } |
158 | TYPE_KW => { | 158 | TYPE_KW => { |
159 | type_item(p); | 159 | type_def(p); |
160 | TYPE_DEF | 160 | TYPE_DEF |
161 | } | 161 | } |
162 | MOD_KW => { | 162 | MOD_KW => { |
@@ -164,7 +164,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> { | |||
164 | MODULE | 164 | MODULE |
165 | } | 165 | } |
166 | STRUCT_KW => { | 166 | STRUCT_KW => { |
167 | structs::struct_item(p); | 167 | structs::struct_def(p); |
168 | if p.at(SEMI) { | 168 | if p.at(SEMI) { |
169 | p.err_and_bump( | 169 | p.err_and_bump( |
170 | "expected item, found `;`\n\ | 170 | "expected item, found `;`\n\ |
@@ -174,7 +174,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> { | |||
174 | STRUCT_DEF | 174 | STRUCT_DEF |
175 | } | 175 | } |
176 | ENUM_KW => { | 176 | ENUM_KW => { |
177 | structs::enum_item(p); | 177 | structs::enum_def(p); |
178 | ENUM_DEF | 178 | ENUM_DEF |
179 | } | 179 | } |
180 | USE_KW => { | 180 | USE_KW => { |
@@ -182,11 +182,11 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> { | |||
182 | USE_ITEM | 182 | USE_ITEM |
183 | } | 183 | } |
184 | CONST_KW if (la == IDENT || la == MUT_KW) => { | 184 | CONST_KW if (la == IDENT || la == MUT_KW) => { |
185 | consts::const_item(p); | 185 | consts::const_def(p); |
186 | CONST_DEF | 186 | CONST_DEF |
187 | } | 187 | } |
188 | STATIC_KW => { | 188 | STATIC_KW => { |
189 | consts::static_item(p); | 189 | consts::static_def(p); |
190 | STATIC_DEF | 190 | STATIC_DEF |
191 | } | 191 | } |
192 | // test extern_block | 192 | // test extern_block |
@@ -249,7 +249,7 @@ fn function(p: &mut Parser) { | |||
249 | 249 | ||
250 | // test type_item | 250 | // test type_item |
251 | // type Foo = Bar; | 251 | // type Foo = Bar; |
252 | fn type_item(p: &mut Parser) { | 252 | fn type_def(p: &mut Parser) { |
253 | assert!(p.at(TYPE_KW)); | 253 | assert!(p.at(TYPE_KW)); |
254 | p.bump(); | 254 | p.bump(); |
255 | 255 | ||
diff --git a/crates/libsyntax2/src/grammar/items/structs.rs b/crates/libsyntax2/src/grammar/items/structs.rs index 67616eaad..80e77edd3 100644 --- a/crates/libsyntax2/src/grammar/items/structs.rs +++ b/crates/libsyntax2/src/grammar/items/structs.rs | |||
@@ -1,6 +1,6 @@ | |||
1 | use super::*; | 1 | use super::*; |
2 | 2 | ||
3 | pub(super) fn struct_item(p: &mut Parser) { | 3 | pub(super) fn struct_def(p: &mut Parser) { |
4 | assert!(p.at(STRUCT_KW)); | 4 | assert!(p.at(STRUCT_KW)); |
5 | p.bump(); | 5 | p.bump(); |
6 | 6 | ||
@@ -38,7 +38,7 @@ pub(super) fn struct_item(p: &mut Parser) { | |||
38 | } | 38 | } |
39 | } | 39 | } |
40 | 40 | ||
41 | pub(super) fn enum_item(p: &mut Parser) { | 41 | pub(super) fn enum_def(p: &mut Parser) { |
42 | assert!(p.at(ENUM_KW)); | 42 | assert!(p.at(ENUM_KW)); |
43 | p.bump(); | 43 | p.bump(); |
44 | name(p); | 44 | name(p); |
diff --git a/crates/libsyntax2/src/grammar/items/traits.rs b/crates/libsyntax2/src/grammar/items/traits.rs index 0b9fb2b0b..53a636f6c 100644 --- a/crates/libsyntax2/src/grammar/items/traits.rs +++ b/crates/libsyntax2/src/grammar/items/traits.rs | |||
@@ -2,7 +2,7 @@ use super::*; | |||
2 | 2 | ||
3 | // test trait_item | 3 | // test trait_item |
4 | // trait T<U>: Hash + Clone where U: Copy {} | 4 | // trait T<U>: Hash + Clone where U: Copy {} |
5 | pub(super) fn trait_item(p: &mut Parser) { | 5 | pub(super) fn trait_def(p: &mut Parser) { |
6 | assert!(p.at(TRAIT_KW)); | 6 | assert!(p.at(TRAIT_KW)); |
7 | p.bump(); | 7 | p.bump(); |
8 | name(p); | 8 | name(p); |