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

24 lines
400 B
Rust
Raw Normal View History

use crate::lst_parser::syntax_kind::SyntaxKind;
2024-04-24 11:07:38 +02:00
#[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,
}
}
}