mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
Explain TOMBSTONE and EOF
This commit is contained in:
parent
aff82e5ee1
commit
52104f7d25
2 changed files with 12 additions and 4 deletions
|
@ -51,8 +51,12 @@ impl Grammar {
|
|||
write!(acc, " {},\n", scream(kind)).unwrap();
|
||||
}
|
||||
acc.push_str("\n");
|
||||
acc.push_str(" TOMBSTONE = !0 - 1,\n");
|
||||
acc.push_str(" EOF = !0,\n");
|
||||
acc.push_str(" // Technical SyntaxKinds: they appear temporally during parsing,\n");
|
||||
acc.push_str(" // but never end up in the final tree\n");
|
||||
acc.push_str(" #[doc(hidden)]\n");
|
||||
acc.push_str(" TOMBSTONE,\n");
|
||||
acc.push_str(" #[doc(hidden)]\n");
|
||||
acc.push_str(" EOF,\n");
|
||||
acc.push_str("}\n");
|
||||
acc.push_str("pub(crate) use self::SyntaxKind::*;\n");
|
||||
acc.push_str("\n");
|
||||
|
|
|
@ -92,8 +92,12 @@ pub enum SyntaxKind {
|
|||
ALIAS,
|
||||
VISIBILITY,
|
||||
|
||||
TOMBSTONE = !0 - 1,
|
||||
EOF = !0,
|
||||
// Technical SyntaxKinds: they appear temporally during parsing,
|
||||
// but never end up in the final tree
|
||||
#[doc(hidden)]
|
||||
TOMBSTONE,
|
||||
#[doc(hidden)]
|
||||
EOF,
|
||||
}
|
||||
pub(crate) use self::SyntaxKind::*;
|
||||
|
||||
|
|
Loading…
Reference in a new issue