2024-04-30 12:21:06 +02:00
|
|
|
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,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|