From 52104f7d250470bc35c640904ee2bc32633dbd7e Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 28 Jan 2018 11:43:59 +0300 Subject: Explain TOMBSTONE and EOF --- src/bin/gen.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/bin') diff --git a/src/bin/gen.rs b/src/bin/gen.rs index 4b8a5afec..89609bd77 100644 --- a/src/bin/gen.rs +++ b/src/bin/gen.rs @@ -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"); -- cgit v1.2.3