From 1766aae145c6925a33e427f2fe6ef2a56c301665 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:56:53 +0200 Subject: Rename EnumVariant -> Variant --- crates/ra_parser/src/grammar.rs | 2 +- crates/ra_parser/src/grammar/items/adt.rs | 4 ++-- crates/ra_parser/src/syntax_kind/generated.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_parser') diff --git a/crates/ra_parser/src/grammar.rs b/crates/ra_parser/src/grammar.rs index 03041d110..22a7acdf3 100644 --- a/crates/ra_parser/src/grammar.rs +++ b/crates/ra_parser/src/grammar.rs @@ -144,7 +144,7 @@ pub(crate) fn reparser( BLOCK_EXPR => expressions::block_expr, RECORD_FIELD_LIST => items::record_field_def_list, RECORD_EXPR_FIELD_LIST => items::record_field_list, - ENUM_VARIANT_LIST => items::enum_variant_list, + VARIANT_LIST => items::enum_variant_list, MATCH_ARM_LIST => items::match_arm_list, USE_TREE_LIST => items::use_tree_list, EXTERN_ITEM_LIST => items::extern_item_list, diff --git a/crates/ra_parser/src/grammar/items/adt.rs b/crates/ra_parser/src/grammar/items/adt.rs index aeb7ce86b..addfb59d4 100644 --- a/crates/ra_parser/src/grammar/items/adt.rs +++ b/crates/ra_parser/src/grammar/items/adt.rs @@ -91,7 +91,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) { if p.eat(T![=]) { expressions::expr(p); } - var.complete(p, ENUM_VARIANT); + var.complete(p, VARIANT); } else { var.abandon(p); p.err_and_bump("expected enum variant"); @@ -101,7 +101,7 @@ pub(crate) fn enum_variant_list(p: &mut Parser) { } } p.expect(T!['}']); - m.complete(p, ENUM_VARIANT_LIST); + m.complete(p, VARIANT_LIST); } pub(crate) fn record_field_def_list(p: &mut Parser) { diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index fde9e55f1..3b82347f3 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs @@ -206,12 +206,12 @@ pub enum SyntaxKind { BIN_EXPR, EXTERN_BLOCK, EXTERN_ITEM_LIST, - ENUM_VARIANT, + VARIANT, RECORD_FIELD_LIST, RECORD_FIELD, TUPLE_FIELD_LIST, TUPLE_FIELD, - ENUM_VARIANT_LIST, + VARIANT_LIST, ITEM_LIST, ASSOC_ITEM_LIST, ATTR, -- cgit v1.2.3 From 3cd4112bdc924c132cb0eab9d064511a215421ec Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:02:20 +0200 Subject: Finalize const&static grammar --- crates/ra_parser/src/grammar/items/consts.rs | 4 ++-- crates/ra_parser/src/syntax_kind/generated.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_parser') diff --git a/crates/ra_parser/src/grammar/items/consts.rs b/crates/ra_parser/src/grammar/items/consts.rs index 742a7e056..35ad766dc 100644 --- a/crates/ra_parser/src/grammar/items/consts.rs +++ b/crates/ra_parser/src/grammar/items/consts.rs @@ -3,11 +3,11 @@ use super::*; pub(super) fn static_def(p: &mut Parser, m: Marker) { - const_or_static(p, m, T![static], STATIC_DEF) + const_or_static(p, m, T![static], STATIC) } pub(super) fn const_def(p: &mut Parser, m: Marker) { - const_or_static(p, m, T![const], CONST_DEF) + const_or_static(p, m, T![const], CONST) } fn const_or_static(p: &mut Parser, m: Marker, kw: SyntaxKind, def: SyntaxKind) { diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs index 3b82347f3..64889676e 100644 --- a/crates/ra_parser/src/syntax_kind/generated.rs +++ b/crates/ra_parser/src/syntax_kind/generated.rs @@ -131,8 +131,8 @@ pub enum SyntaxKind { EXTERN_CRATE, MODULE, USE, - STATIC_DEF, - CONST_DEF, + STATIC, + CONST, TRAIT_DEF, IMPL_DEF, TYPE_ALIAS, -- cgit v1.2.3