diff options
Diffstat (limited to 'crates/ra_syntax/src/grammar/mod.rs')
-rw-r--r-- | crates/ra_syntax/src/grammar/mod.rs | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/crates/ra_syntax/src/grammar/mod.rs b/crates/ra_syntax/src/grammar/mod.rs index 1199ba230..c87564073 100644 --- a/crates/ra_syntax/src/grammar/mod.rs +++ b/crates/ra_syntax/src/grammar/mod.rs | |||
@@ -31,28 +31,18 @@ mod type_args; | |||
31 | mod type_params; | 31 | mod type_params; |
32 | mod types; | 32 | mod types; |
33 | 33 | ||
34 | use crate::{ | ||
35 | token_set::TokenSet, | ||
36 | parser_api::{Marker, CompletedMarker, Parser}, | ||
37 | SyntaxKind::{self, *}, | ||
38 | }; | ||
39 | pub(crate) use self::{ | 34 | pub(crate) use self::{ |
40 | expressions::{ | 35 | expressions::block, |
41 | block, | ||
42 | }, | ||
43 | items::{ | 36 | items::{ |
44 | enum_variant_list, | 37 | enum_variant_list, extern_item_list, impl_item_list, match_arm_list, mod_item_list, |
45 | extern_item_list, | 38 | named_field_def_list, named_field_list, token_tree, trait_item_list, use_tree_list, |
46 | impl_item_list, | ||
47 | match_arm_list, | ||
48 | mod_item_list, | ||
49 | named_field_def_list, | ||
50 | named_field_list, | ||
51 | token_tree, | ||
52 | trait_item_list, | ||
53 | use_tree_list, | ||
54 | }, | 39 | }, |
55 | }; | 40 | }; |
41 | use crate::{ | ||
42 | parser_api::{CompletedMarker, Marker, Parser}, | ||
43 | token_set::TokenSet, | ||
44 | SyntaxKind::{self, *}, | ||
45 | }; | ||
56 | 46 | ||
57 | pub(crate) fn root(p: &mut Parser) { | 47 | pub(crate) fn root(p: &mut Parser) { |
58 | let m = p.start(); | 48 | let m = p.start(); |
@@ -61,7 +51,6 @@ pub(crate) fn root(p: &mut Parser) { | |||
61 | m.complete(p, ROOT); | 51 | m.complete(p, ROOT); |
62 | } | 52 | } |
63 | 53 | ||
64 | |||
65 | #[derive(Clone, Copy, PartialEq, Eq)] | 54 | #[derive(Clone, Copy, PartialEq, Eq)] |
66 | enum BlockLike { | 55 | enum BlockLike { |
67 | Block, | 56 | Block, |
@@ -69,7 +58,9 @@ enum BlockLike { | |||
69 | } | 58 | } |
70 | 59 | ||
71 | impl BlockLike { | 60 | impl BlockLike { |
72 | fn is_block(self) -> bool { self == BlockLike::Block } | 61 | fn is_block(self) -> bool { |
62 | self == BlockLike::Block | ||
63 | } | ||
73 | } | 64 | } |
74 | 65 | ||
75 | fn opt_visibility(p: &mut Parser) { | 66 | fn opt_visibility(p: &mut Parser) { |