pub struct Marker { /* private fields */ }
Expand description
A structure signifying the start of parsing of a syntax tree node
Implementations§
Source§impl Marker
impl Marker
pub fn new(pos: u32, start: TextSize) -> Marker
Sourcepub fn complete<P>(self, p: &mut P, kind: P::Kind) -> CompletedMarkerwhere
P: Parser,
pub fn complete<P>(self, p: &mut P, kind: P::Kind) -> CompletedMarkerwhere
P: Parser,
Finishes the syntax tree node and assigns kind
to it,
and mark the create a CompletedMarker
for possible future
operation like .precede()
to deal with forward_parent.
Sourcepub fn abandon<P>(self, p: &mut P)where
P: Parser,
pub fn abandon<P>(self, p: &mut P)where
P: Parser,
Abandons the syntax tree node. All its children are attached to its parent instead.
pub fn start(&self) -> TextSize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Marker
impl RefUnwindSafe for Marker
impl Send for Marker
impl Sync for Marker
impl Unpin for Marker
impl UnwindSafe for Marker
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