iowo/crates/lang/src/parser/events.rs

24 lines
396 B
Rust
Raw Normal View History

2024-04-24 09:07:38 +00:00
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,
}
}
}