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

23 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,
}
}
}