From c83467796b6c7365ea4f41900d74444384a9e618 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:17:28 +0200 Subject: Finalize Trait grammar --- crates/ra_parser/src/grammar.rs | 2 +- crates/ra_parser/src/grammar/items.rs | 2 +- crates/ra_parser/src/syntax_kind/generated.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_parser') diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index 22a7acdf3..cd4b2381d 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs @@ -151,7 +151,7 @@ pub(crate) fn reparser( TOKEN_TREE if first_child? == T!['{'] => items::token_tree, ASSOC_ITEM_LIST => match parent? { IMPL_DEF => items::impl_item_list, - TRAIT_DEF => items::trait_item_list, + TRAIT => items::trait_item_list, _ => return None, }, ITEM_LIST => items::mod_item_list, diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 664b23f6a..5603d61a9 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs @@ -193,7 +193,7 @@ pub(super) fn maybe_item(p: &mut Parser, m: Marker, flavor: ItemFlavor) -> Resul // unsafe auto trait T {} T![trait] => { traits::trait_def(p); - m.complete(p, TRAIT_DEF); + m.complete(p, TRAIT); } // test unsafe_impl diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 64889676e..27eed0090 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs @@ -133,7 +133,7 @@ pub enum SyntaxKind { USE, STATIC, CONST, - TRAIT_DEF, + TRAIT, IMPL_DEF, TYPE_ALIAS, MACRO_CALL, -- cgit v1.2.3 From c5798c4d75aa807aec47208a49101bdec3affcca Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:28:28 +0200 Subject: Finalize impl Grammar --- crates/ra_parser/src/grammar.rs | 2 +- crates/ra_parser/src/grammar/items.rs | 2 +- crates/ra_parser/src/syntax_kind/generated.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_parser') diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index cd4b2381d..c2e1d701e 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs @@ -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, }, diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs index 5603d61a9..cca524cea 100644 --- a/crates/ra_parser/src/grammar/items.rs +++ b/crates/ra_parser/src/grammar/items.rs @@ -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 diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 27eed0090..d1b22f08a 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs @@ -134,7 +134,7 @@ pub enum SyntaxKind { STATIC, CONST, TRAIT, - IMPL_DEF, + IMPL, TYPE_ALIAS, MACRO_CALL, TOKEN_TREE, -- cgit v1.2.3