forked from katzen-cafe/iowo
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,
|
mut self,
|
||||||
p: &mut Parser<SyntaxKind, SyntaxErr>,
|
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