mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2024-12-22 01:55:51 +01:00
implement Marker::abandon
This commit is contained in:
parent
b8720b2df9
commit
c564d0f24c
1 changed files with 12 additions and 0 deletions
|
@ -59,6 +59,18 @@ impl Marker {
|
|||
mut self,
|
||||
p: &mut Parser<SyntaxKind, SyntaxErr>,
|
||||
) {
|
||||
self.bomb.defuse();
|
||||
|
||||
// clean up empty tombstone event from marker
|
||||
if self.pos == p.events.len() - 1 {
|
||||
match p.events.pop() {
|
||||
Some(Event::Start {
|
||||
kind: NodeKind::Tombstone,
|
||||
forward_parent: None,
|
||||
}) => (),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue