Struct biome_parser::Marker
source · 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 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