Re-implement syntax fixups

This commit is contained in:
Lukas Wirth 2023-11-29 15:48:40 +01:00
parent 7a8c4c001b
commit f48fa0c6cb
7 changed files with 406 additions and 262 deletions

View file

@ -34,8 +34,6 @@ impl SyntaxContextId {
// we need a special value that behaves as the current context.
pub const SELF_REF: Self =
SyntaxContextId(unsafe { InternId::new_unchecked(InternId::MAX - 1) });
// Used for syntax fixups
pub const FAKE: Self = SyntaxContextId(unsafe { InternId::new_unchecked(InternId::MAX - 2) });
pub fn is_root(self) -> bool {
self == Self::ROOT