pub enum Event {
NodeStarted {
kind: SyntaxKind,
forward_parent: Option<usize>,
},
NodeFinished,
Token {
kind: SyntaxKind,
span: Span,
},
}Expand description
Represents an event produced by the parser.
The parser produces a stream of events that can be used to construct a CST.
Variants§
NodeStarted
A new node has started.
Fields
§
kind: SyntaxKindThe kind of the node.
NodeFinished
A node has finished.
Token
A token was encountered.
Implementations§
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more