diff options
Diffstat (limited to 'crates/ra_parser')
-rw-r--r-- | crates/ra_parser/src/grammar.rs | 6 | ||||
-rw-r--r-- | crates/ra_parser/src/grammar/items/traits.rs | 4 | ||||
-rw-r--r-- | crates/ra_parser/src/syntax_kind/generated.rs | 3 |
3 files changed, 7 insertions, 6 deletions
diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index de2c98afd..7dfac2813 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs | |||
@@ -149,12 +149,12 @@ pub(crate) fn reparser( | |||
149 | USE_TREE_LIST => items::use_tree_list, | 149 | USE_TREE_LIST => items::use_tree_list, |
150 | EXTERN_ITEM_LIST => items::extern_item_list, | 150 | EXTERN_ITEM_LIST => items::extern_item_list, |
151 | TOKEN_TREE if first_child? == T!['{'] => items::token_tree, | 151 | TOKEN_TREE if first_child? == T!['{'] => items::token_tree, |
152 | ITEM_LIST => match parent? { | 152 | ASSOC_ITEM_LIST => match parent? { |
153 | IMPL_DEF => items::impl_item_list, | 153 | IMPL_DEF => items::impl_item_list, |
154 | TRAIT_DEF => items::trait_item_list, | 154 | TRAIT_DEF => items::trait_item_list, |
155 | MODULE => items::mod_item_list, | ||
156 | _ => return None, | 155 | _ => return None, |
157 | }, | 156 | }, |
157 | ITEM_LIST => items::mod_item_list, | ||
158 | _ => return None, | 158 | _ => return None, |
159 | }; | 159 | }; |
160 | Some(res) | 160 | Some(res) |
@@ -224,7 +224,7 @@ fn opt_alias(p: &mut Parser) { | |||
224 | if !p.eat(T![_]) { | 224 | if !p.eat(T![_]) { |
225 | name(p); | 225 | name(p); |
226 | } | 226 | } |
227 | m.complete(p, ALIAS); | 227 | m.complete(p, RENAME); |
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
diff --git a/crates/ra_parser/src/grammar/items/traits.rs b/crates/ra_parser/src/grammar/items/traits.rs index c819e33be..ef9c8ff5b 100644 --- a/crates/ra_parser/src/grammar/items/traits.rs +++ b/crates/ra_parser/src/grammar/items/traits.rs | |||
@@ -50,7 +50,7 @@ pub(crate) fn trait_item_list(p: &mut Parser) { | |||
50 | item_or_macro(p, true, ItemFlavor::Trait); | 50 | item_or_macro(p, true, ItemFlavor::Trait); |
51 | } | 51 | } |
52 | p.expect(T!['}']); | 52 | p.expect(T!['}']); |
53 | m.complete(p, ITEM_LIST); | 53 | m.complete(p, ASSOC_ITEM_LIST); |
54 | } | 54 | } |
55 | 55 | ||
56 | // test impl_def | 56 | // test impl_def |
@@ -107,7 +107,7 @@ pub(crate) fn impl_item_list(p: &mut Parser) { | |||
107 | item_or_macro(p, true, ItemFlavor::Mod); | 107 | item_or_macro(p, true, ItemFlavor::Mod); |
108 | } | 108 | } |
109 | p.expect(T!['}']); | 109 | p.expect(T!['}']); |
110 | m.complete(p, ITEM_LIST); | 110 | m.complete(p, ASSOC_ITEM_LIST); |
111 | } | 111 | } |
112 | 112 | ||
113 | // test impl_type_params | 113 | // test impl_type_params |
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 625f0c822..f14b60b65 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs | |||
@@ -213,6 +213,7 @@ pub enum SyntaxKind { | |||
213 | TUPLE_FIELD_DEF, | 213 | TUPLE_FIELD_DEF, |
214 | ENUM_VARIANT_LIST, | 214 | ENUM_VARIANT_LIST, |
215 | ITEM_LIST, | 215 | ITEM_LIST, |
216 | ASSOC_ITEM_LIST, | ||
216 | ATTR, | 217 | ATTR, |
217 | META_ITEM, | 218 | META_ITEM, |
218 | USE_TREE, | 219 | USE_TREE, |
@@ -220,7 +221,7 @@ pub enum SyntaxKind { | |||
220 | PATH, | 221 | PATH, |
221 | PATH_SEGMENT, | 222 | PATH_SEGMENT, |
222 | LITERAL, | 223 | LITERAL, |
223 | ALIAS, | 224 | RENAME, |
224 | VISIBILITY, | 225 | VISIBILITY, |
225 | WHERE_CLAUSE, | 226 | WHERE_CLAUSE, |
226 | WHERE_PRED, | 227 | WHERE_PRED, |