diff options
Diffstat (limited to 'crates/libsyntax2/src/grammar/items')
-rw-r--r-- | crates/libsyntax2/src/grammar/items/mod.rs | 15 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/nominal.rs | 2 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/traits.rs | 4 | ||||
-rw-r--r-- | crates/libsyntax2/src/grammar/items/use_item.rs | 2 |
4 files changed, 14 insertions, 9 deletions
diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs index 85d7fe770..8c19aa179 100644 --- a/crates/libsyntax2/src/grammar/items/mod.rs +++ b/crates/libsyntax2/src/grammar/items/mod.rs | |||
@@ -5,7 +5,12 @@ mod traits; | |||
5 | mod use_item; | 5 | mod use_item; |
6 | 6 | ||
7 | use super::*; | 7 | use super::*; |
8 | pub(crate) use self::nominal::named_field_def_list; | 8 | pub(crate) use self::{ |
9 | expressions::{named_field_list, match_arm_list}, | ||
10 | nominal::{enum_variant_list, named_field_def_list}, | ||
11 | traits::{trait_item_list, impl_item_list}, | ||
12 | use_item::use_tree_list, | ||
13 | }; | ||
9 | 14 | ||
10 | // test mod_contents | 15 | // test mod_contents |
11 | // fn foo() {} | 16 | // fn foo() {} |
@@ -223,7 +228,7 @@ fn extern_crate_item(p: &mut Parser) { | |||
223 | p.expect(SEMI); | 228 | p.expect(SEMI); |
224 | } | 229 | } |
225 | 230 | ||
226 | fn extern_item_list(p: &mut Parser) { | 231 | pub(crate) fn extern_item_list(p: &mut Parser) { |
227 | assert!(p.at(L_CURLY)); | 232 | assert!(p.at(L_CURLY)); |
228 | let m = p.start(); | 233 | let m = p.start(); |
229 | p.bump(); | 234 | p.bump(); |
@@ -295,7 +300,7 @@ fn type_def(p: &mut Parser) { | |||
295 | p.expect(SEMI); | 300 | p.expect(SEMI); |
296 | } | 301 | } |
297 | 302 | ||
298 | fn mod_item(p: &mut Parser) { | 303 | pub(crate) fn mod_item(p: &mut Parser) { |
299 | assert!(p.at(MOD_KW)); | 304 | assert!(p.at(MOD_KW)); |
300 | p.bump(); | 305 | p.bump(); |
301 | 306 | ||
@@ -307,7 +312,7 @@ fn mod_item(p: &mut Parser) { | |||
307 | } | 312 | } |
308 | } | 313 | } |
309 | 314 | ||
310 | fn mod_item_list(p: &mut Parser) { | 315 | pub(crate) fn mod_item_list(p: &mut Parser) { |
311 | assert!(p.at(L_CURLY)); | 316 | assert!(p.at(L_CURLY)); |
312 | let m = p.start(); | 317 | let m = p.start(); |
313 | p.bump(); | 318 | p.bump(); |
@@ -343,7 +348,7 @@ pub(super) fn macro_call_after_excl(p: &mut Parser) -> BlockLike { | |||
343 | flavor | 348 | flavor |
344 | } | 349 | } |
345 | 350 | ||
346 | pub(super) fn token_tree(p: &mut Parser) { | 351 | pub(crate) fn token_tree(p: &mut Parser) { |
347 | let closing_paren_kind = match p.current() { | 352 | let closing_paren_kind = match p.current() { |
348 | L_CURLY => R_CURLY, | 353 | L_CURLY => R_CURLY, |
349 | L_PAREN => R_PAREN, | 354 | L_PAREN => R_PAREN, |
diff --git a/crates/libsyntax2/src/grammar/items/nominal.rs b/crates/libsyntax2/src/grammar/items/nominal.rs index 3db5b24af..11c43e371 100644 --- a/crates/libsyntax2/src/grammar/items/nominal.rs +++ b/crates/libsyntax2/src/grammar/items/nominal.rs | |||
@@ -51,7 +51,7 @@ pub(super) fn enum_def(p: &mut Parser) { | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | fn enum_variant_list(p: &mut Parser) { | 54 | pub(crate) fn enum_variant_list(p: &mut Parser) { |
55 | assert!(p.at(L_CURLY)); | 55 | assert!(p.at(L_CURLY)); |
56 | let m = p.start(); | 56 | let m = p.start(); |
57 | p.bump(); | 57 | p.bump(); |
diff --git a/crates/libsyntax2/src/grammar/items/traits.rs b/crates/libsyntax2/src/grammar/items/traits.rs index 9d21d4d36..c21cfb1a9 100644 --- a/crates/libsyntax2/src/grammar/items/traits.rs +++ b/crates/libsyntax2/src/grammar/items/traits.rs | |||
@@ -25,7 +25,7 @@ pub(super) fn trait_def(p: &mut Parser) { | |||
25 | // fn foo() {} | 25 | // fn foo() {} |
26 | // fn bar(&self); | 26 | // fn bar(&self); |
27 | // } | 27 | // } |
28 | fn trait_item_list(p: &mut Parser) { | 28 | pub(crate) fn trait_item_list(p: &mut Parser) { |
29 | assert!(p.at(L_CURLY)); | 29 | assert!(p.at(L_CURLY)); |
30 | let m = p.start(); | 30 | let m = p.start(); |
31 | p.bump(); | 31 | p.bump(); |
@@ -74,7 +74,7 @@ pub(super) fn impl_item(p: &mut Parser) { | |||
74 | // fn foo() {} | 74 | // fn foo() {} |
75 | // fn bar(&self) {} | 75 | // fn bar(&self) {} |
76 | // } | 76 | // } |
77 | fn impl_item_list(p: &mut Parser) { | 77 | pub(crate) fn impl_item_list(p: &mut Parser) { |
78 | assert!(p.at(L_CURLY)); | 78 | assert!(p.at(L_CURLY)); |
79 | let m = p.start(); | 79 | let m = p.start(); |
80 | p.bump(); | 80 | p.bump(); |
diff --git a/crates/libsyntax2/src/grammar/items/use_item.rs b/crates/libsyntax2/src/grammar/items/use_item.rs index 2fbf2234a..1ee4349fd 100644 --- a/crates/libsyntax2/src/grammar/items/use_item.rs +++ b/crates/libsyntax2/src/grammar/items/use_item.rs | |||
@@ -53,7 +53,7 @@ fn use_tree(p: &mut Parser) { | |||
53 | m.complete(p, USE_TREE); | 53 | m.complete(p, USE_TREE); |
54 | } | 54 | } |
55 | 55 | ||
56 | fn use_tree_list(p: &mut Parser) { | 56 | pub(crate) fn use_tree_list(p: &mut Parser) { |
57 | assert!(p.at(L_CURLY)); | 57 | assert!(p.at(L_CURLY)); |
58 | let m = p.start(); | 58 | let m = p.start(); |
59 | p.bump(); | 59 | p.bump(); |