forked from katzen-cafe/iowo
24 lines
396 B
Rust
24 lines
396 B
Rust
|
use crate::parser::syntax_kind::SyntaxKind;
|
||
|
|
||
|
#[derive(Debug)]
|
||
|
pub enum Event {
|
||
|
Start {
|
||
|
kind: SyntaxKind,
|
||
|
forward_parent: Option<usize>,
|
||
|
},
|
||
|
Finish,
|
||
|
Eat {
|
||
|
count: usize,
|
||
|
},
|
||
|
Error,
|
||
|
}
|
||
|
|
||
|
impl Event {
|
||
|
pub(crate) fn tombstone() -> Self {
|
||
|
Self::Start {
|
||
|
kind: SyntaxKind::TOMBSTONE,
|
||
|
forward_parent: None,
|
||
|
}
|
||
|
}
|
||
|
}
|