[][src]Struct rslint_parser::Marker

pub struct Marker {
    pub pos: u32,
    pub start: usize,
    pub old_start: u32,
}

A structure signifying the start of parsing of a syntax tree node

Fields

pos: u32

The index in the events list

start: usize

The byte index where the node starts

old_start: u32

Implementations

impl Marker[src]

pub fn new(pos: u32, start: usize) -> Marker[src]

pub fn complete(self, p: &mut Parser<'_>, kind: SyntaxKind) -> CompletedMarker[src]

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.

pub fn abandon(self, p: &mut Parser<'_>)[src]

Abandons the syntax tree node. All its children are attached to its parent instead.

Trait Implementations

impl Clone for Marker[src]

impl Copy for Marker[src]

impl Debug for Marker[src]

impl Eq for Marker[src]

impl Hash for Marker[src]

impl PartialEq<Marker> for Marker[src]

impl StructuralEq for Marker[src]

impl StructuralPartialEq for Marker[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erasable for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.