From e69c70e2a208fd89d4d49a104f5516c55546309e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 11 Aug 2018 10:05:26 +0300 Subject: ENUM_ITEM -> ENUM --- crates/libeditor/src/lib.rs | 2 +- crates/libsyntax2/src/grammar.ron | 2 +- crates/libsyntax2/src/grammar/items/mod.rs | 2 +- crates/libsyntax2/src/syntax_kinds/generated.rs | 4 ++-- crates/libsyntax2/tests/data/parser/ok/0019_enums.txt | 10 +++++----- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'crates') diff --git a/crates/libeditor/src/lib.rs b/crates/libeditor/src/lib.rs index a83fb7d17..df0938e90 100644 --- a/crates/libeditor/src/lib.rs +++ b/crates/libeditor/src/lib.rs @@ -141,7 +141,7 @@ struct Declaration<'f> (SyntaxNodeRef<'f>); impl<'f> Declaration<'f> { fn cast(node: SyntaxNodeRef<'f>) -> Option> { match node.kind() { - | STRUCT | ENUM_ITEM | FUNCTION | TRAIT_ITEM + | STRUCT | ENUM | FUNCTION | TRAIT_ITEM | CONST_ITEM | STATIC_ITEM | MOD_ITEM | NAMED_FIELD | TYPE_ITEM => Some(Declaration(node)), _ => None diff --git a/crates/libsyntax2/src/grammar.ron b/crates/libsyntax2/src/grammar.ron index 4d0343747..06a4eb6a7 100644 --- a/crates/libsyntax2/src/grammar.ron +++ b/crates/libsyntax2/src/grammar.ron @@ -109,7 +109,7 @@ Grammar( "FILE", "STRUCT", - "ENUM_ITEM", + "ENUM", "FUNCTION", "EXTERN_CRATE_ITEM", "MOD_ITEM", diff --git a/crates/libsyntax2/src/grammar/items/mod.rs b/crates/libsyntax2/src/grammar/items/mod.rs index 1125daed9..be4ff976a 100644 --- a/crates/libsyntax2/src/grammar/items/mod.rs +++ b/crates/libsyntax2/src/grammar/items/mod.rs @@ -175,7 +175,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option { } ENUM_KW => { structs::enum_item(p); - ENUM_ITEM + ENUM } USE_KW => { use_item::use_item(p); diff --git a/crates/libsyntax2/src/syntax_kinds/generated.rs b/crates/libsyntax2/src/syntax_kinds/generated.rs index 7e7d00d9d..7d2fb60f6 100644 --- a/crates/libsyntax2/src/syntax_kinds/generated.rs +++ b/crates/libsyntax2/src/syntax_kinds/generated.rs @@ -109,7 +109,7 @@ pub enum SyntaxKind { SHEBANG, FILE, STRUCT, - ENUM_ITEM, + ENUM, FUNCTION, EXTERN_CRATE_ITEM, MOD_ITEM, @@ -344,7 +344,7 @@ impl SyntaxKind { SHEBANG => &SyntaxInfo { name: "SHEBANG" }, FILE => &SyntaxInfo { name: "FILE" }, STRUCT => &SyntaxInfo { name: "STRUCT" }, - ENUM_ITEM => &SyntaxInfo { name: "ENUM_ITEM" }, + ENUM => &SyntaxInfo { name: "ENUM" }, FUNCTION => &SyntaxInfo { name: "FUNCTION" }, EXTERN_CRATE_ITEM => &SyntaxInfo { name: "EXTERN_CRATE_ITEM" }, MOD_ITEM => &SyntaxInfo { name: "MOD_ITEM" }, diff --git a/crates/libsyntax2/tests/data/parser/ok/0019_enums.txt b/crates/libsyntax2/tests/data/parser/ok/0019_enums.txt index 8650381cd..0ddf7eb9d 100644 --- a/crates/libsyntax2/tests/data/parser/ok/0019_enums.txt +++ b/crates/libsyntax2/tests/data/parser/ok/0019_enums.txt @@ -1,5 +1,5 @@ FILE@[0; 182) - ENUM_ITEM@[0; 11) + ENUM@[0; 11) ENUM_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 7) @@ -9,7 +9,7 @@ FILE@[0; 182) WHITESPACE@[9; 10) R_CURLY@[10; 11) WHITESPACE@[11; 13) - ENUM_ITEM@[13; 27) + ENUM@[13; 27) ENUM_KW@[13; 17) WHITESPACE@[17; 18) NAME@[18; 20) @@ -25,7 +25,7 @@ FILE@[0; 182) WHITESPACE@[25; 26) R_CURLY@[26; 27) WHITESPACE@[27; 29) - ENUM_ITEM@[29; 46) + ENUM@[29; 46) ENUM_KW@[29; 33) WHITESPACE@[33; 34) NAME@[34; 36) @@ -39,7 +39,7 @@ FILE@[0; 182) WHITESPACE@[44; 45) R_CURLY@[45; 46) WHITESPACE@[46; 48) - ENUM_ITEM@[48; 66) + ENUM@[48; 66) ENUM_KW@[48; 52) WHITESPACE@[52; 53) NAME@[53; 55) @@ -54,7 +54,7 @@ FILE@[0; 182) WHITESPACE@[64; 65) R_CURLY@[65; 66) WHITESPACE@[66; 68) - ENUM_ITEM@[68; 181) + ENUM@[68; 181) ENUM_KW@[68; 72) WHITESPACE@[72; 73) NAME@[73; 75) -- cgit v1.2.3