Finalize impl Grammar

This commit is contained in:
Aleksey Kladov 2020-07-30 18:28:28 +02:00
parent c83467796b
commit c5798c4d75
54 changed files with 103 additions and 100 deletions

View file

@ -150,7 +150,7 @@ pub(crate) fn reparser(
EXTERN_ITEM_LIST => items::extern_item_list,
TOKEN_TREE if first_child? == T!['{'] => items::token_tree,
ASSOC_ITEM_LIST => match parent? {
IMPL_DEF => items::impl_item_list,
IMPL => items::impl_item_list,
TRAIT => items::trait_item_list,
_ => return None,
},

View file

@ -221,7 +221,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul
// unsafe default impl Foo {}
T![impl] => {
traits::impl_def(p);
m.complete(p, IMPL_DEF);
m.complete(p, IMPL);
}
// test existential_type

View file

@ -134,7 +134,7 @@ pub enum SyntaxKind {
STATIC,
CONST,
TRAIT,
IMPL_DEF,
IMPL,
TYPE_ALIAS,
MACRO_CALL,
TOKEN_TREE,