aboutsummaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-01-28 08:43:59 +0000
committerAleksey Kladov <[email protected]>2018-01-28 08:43:59 +0000
commit52104f7d250470bc35c640904ee2bc32633dbd7e (patch)
tree4d2bf45c6bbce7edf426eb055b50872510116e30 /src/bin
parentaff82e5ee1d587b858e7237511e611bb8cc61cf3 (diff)
Explain TOMBSTONE and EOF
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/gen.rs8
1 files changed, 6 insertions, 2 deletions
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 {
51 write!(acc, " {},\n", scream(kind)).unwrap(); 51 write!(acc, " {},\n", scream(kind)).unwrap();
52 } 52 }
53 acc.push_str("\n"); 53 acc.push_str("\n");
54 acc.push_str(" TOMBSTONE = !0 - 1,\n"); 54 acc.push_str(" // Technical SyntaxKinds: they appear temporally during parsing,\n");
55 acc.push_str(" EOF = !0,\n"); 55 acc.push_str(" // but never end up in the final tree\n");
56 acc.push_str(" #[doc(hidden)]\n");
57 acc.push_str(" TOMBSTONE,\n");
58 acc.push_str(" #[doc(hidden)]\n");
59 acc.push_str(" EOF,\n");
56 acc.push_str("}\n"); 60 acc.push_str("}\n");
57 acc.push_str("pub(crate) use self::SyntaxKind::*;\n"); 61 acc.push_str("pub(crate) use self::SyntaxKind::*;\n");
58 acc.push_str("\n"); 62 acc.push_str("\n");