mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 13:18:47 +00:00
ENUM_ITEM -> ENUM
This commit is contained in:
parent
7698d37fa4
commit
e69c70e2a2
5 changed files with 10 additions and 10 deletions
|
@ -141,7 +141,7 @@ struct Declaration<'f> (SyntaxNodeRef<'f>);
|
||||||
impl<'f> Declaration<'f> {
|
impl<'f> Declaration<'f> {
|
||||||
fn cast(node: SyntaxNodeRef<'f>) -> Option<Declaration<'f>> {
|
fn cast(node: SyntaxNodeRef<'f>) -> Option<Declaration<'f>> {
|
||||||
match node.kind() {
|
match node.kind() {
|
||||||
| STRUCT | ENUM_ITEM | FUNCTION | TRAIT_ITEM
|
| STRUCT | ENUM | FUNCTION | TRAIT_ITEM
|
||||||
| CONST_ITEM | STATIC_ITEM | MOD_ITEM | NAMED_FIELD
|
| CONST_ITEM | STATIC_ITEM | MOD_ITEM | NAMED_FIELD
|
||||||
| TYPE_ITEM => Some(Declaration(node)),
|
| TYPE_ITEM => Some(Declaration(node)),
|
||||||
_ => None
|
_ => None
|
||||||
|
|
|
@ -109,7 +109,7 @@ Grammar(
|
||||||
"FILE",
|
"FILE",
|
||||||
|
|
||||||
"STRUCT",
|
"STRUCT",
|
||||||
"ENUM_ITEM",
|
"ENUM",
|
||||||
"FUNCTION",
|
"FUNCTION",
|
||||||
"EXTERN_CRATE_ITEM",
|
"EXTERN_CRATE_ITEM",
|
||||||
"MOD_ITEM",
|
"MOD_ITEM",
|
||||||
|
|
|
@ -175,7 +175,7 @@ fn items_without_modifiers(p: &mut Parser) -> Option<SyntaxKind> {
|
||||||
}
|
}
|
||||||
ENUM_KW => {
|
ENUM_KW => {
|
||||||
structs::enum_item(p);
|
structs::enum_item(p);
|
||||||
ENUM_ITEM
|
ENUM
|
||||||
}
|
}
|
||||||
USE_KW => {
|
USE_KW => {
|
||||||
use_item::use_item(p);
|
use_item::use_item(p);
|
||||||
|
|
|
@ -109,7 +109,7 @@ pub enum SyntaxKind {
|
||||||
SHEBANG,
|
SHEBANG,
|
||||||
FILE,
|
FILE,
|
||||||
STRUCT,
|
STRUCT,
|
||||||
ENUM_ITEM,
|
ENUM,
|
||||||
FUNCTION,
|
FUNCTION,
|
||||||
EXTERN_CRATE_ITEM,
|
EXTERN_CRATE_ITEM,
|
||||||
MOD_ITEM,
|
MOD_ITEM,
|
||||||
|
@ -344,7 +344,7 @@ impl SyntaxKind {
|
||||||
SHEBANG => &SyntaxInfo { name: "SHEBANG" },
|
SHEBANG => &SyntaxInfo { name: "SHEBANG" },
|
||||||
FILE => &SyntaxInfo { name: "FILE" },
|
FILE => &SyntaxInfo { name: "FILE" },
|
||||||
STRUCT => &SyntaxInfo { name: "STRUCT" },
|
STRUCT => &SyntaxInfo { name: "STRUCT" },
|
||||||
ENUM_ITEM => &SyntaxInfo { name: "ENUM_ITEM" },
|
ENUM => &SyntaxInfo { name: "ENUM" },
|
||||||
FUNCTION => &SyntaxInfo { name: "FUNCTION" },
|
FUNCTION => &SyntaxInfo { name: "FUNCTION" },
|
||||||
EXTERN_CRATE_ITEM => &SyntaxInfo { name: "EXTERN_CRATE_ITEM" },
|
EXTERN_CRATE_ITEM => &SyntaxInfo { name: "EXTERN_CRATE_ITEM" },
|
||||||
MOD_ITEM => &SyntaxInfo { name: "MOD_ITEM" },
|
MOD_ITEM => &SyntaxInfo { name: "MOD_ITEM" },
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FILE@[0; 182)
|
FILE@[0; 182)
|
||||||
ENUM_ITEM@[0; 11)
|
ENUM@[0; 11)
|
||||||
ENUM_KW@[0; 4)
|
ENUM_KW@[0; 4)
|
||||||
WHITESPACE@[4; 5)
|
WHITESPACE@[4; 5)
|
||||||
NAME@[5; 7)
|
NAME@[5; 7)
|
||||||
|
@ -9,7 +9,7 @@ FILE@[0; 182)
|
||||||
WHITESPACE@[9; 10)
|
WHITESPACE@[9; 10)
|
||||||
R_CURLY@[10; 11)
|
R_CURLY@[10; 11)
|
||||||
WHITESPACE@[11; 13)
|
WHITESPACE@[11; 13)
|
||||||
ENUM_ITEM@[13; 27)
|
ENUM@[13; 27)
|
||||||
ENUM_KW@[13; 17)
|
ENUM_KW@[13; 17)
|
||||||
WHITESPACE@[17; 18)
|
WHITESPACE@[17; 18)
|
||||||
NAME@[18; 20)
|
NAME@[18; 20)
|
||||||
|
@ -25,7 +25,7 @@ FILE@[0; 182)
|
||||||
WHITESPACE@[25; 26)
|
WHITESPACE@[25; 26)
|
||||||
R_CURLY@[26; 27)
|
R_CURLY@[26; 27)
|
||||||
WHITESPACE@[27; 29)
|
WHITESPACE@[27; 29)
|
||||||
ENUM_ITEM@[29; 46)
|
ENUM@[29; 46)
|
||||||
ENUM_KW@[29; 33)
|
ENUM_KW@[29; 33)
|
||||||
WHITESPACE@[33; 34)
|
WHITESPACE@[33; 34)
|
||||||
NAME@[34; 36)
|
NAME@[34; 36)
|
||||||
|
@ -39,7 +39,7 @@ FILE@[0; 182)
|
||||||
WHITESPACE@[44; 45)
|
WHITESPACE@[44; 45)
|
||||||
R_CURLY@[45; 46)
|
R_CURLY@[45; 46)
|
||||||
WHITESPACE@[46; 48)
|
WHITESPACE@[46; 48)
|
||||||
ENUM_ITEM@[48; 66)
|
ENUM@[48; 66)
|
||||||
ENUM_KW@[48; 52)
|
ENUM_KW@[48; 52)
|
||||||
WHITESPACE@[52; 53)
|
WHITESPACE@[52; 53)
|
||||||
NAME@[53; 55)
|
NAME@[53; 55)
|
||||||
|
@ -54,7 +54,7 @@ FILE@[0; 182)
|
||||||
WHITESPACE@[64; 65)
|
WHITESPACE@[64; 65)
|
||||||
R_CURLY@[65; 66)
|
R_CURLY@[65; 66)
|
||||||
WHITESPACE@[66; 68)
|
WHITESPACE@[66; 68)
|
||||||
ENUM_ITEM@[68; 181)
|
ENUM@[68; 181)
|
||||||
ENUM_KW@[68; 72)
|
ENUM_KW@[68; 72)
|
||||||
WHITESPACE@[72; 73)
|
WHITESPACE@[72; 73)
|
||||||
NAME@[73; 75)
|
NAME@[73; 75)
|
||||||
|
|
Loading…
Reference in a new issue