[][src]Struct customasm::syntax::Parser

pub struct Parser<'a> {
    pub report: Option<RcReport>,
    pub tokens: &'a [Token],
    // some fields omitted
}

Fields

report: Option<RcReport>tokens: &'a [Token]

Implementations

impl<'a> Parser<'a>[src]

pub fn new(report: Option<RcReport>, tokens: &[Token]) -> Parser<'_>[src]

pub fn suppress_reports(&mut self)[src]

pub fn get_current_token_index(&self) -> usize[src]

pub fn get_previous_token_index(&self) -> usize[src]

pub fn get_full_span(&self) -> Span[src]

pub fn get_next_spans(&self, count: usize) -> Span[src]

pub fn clone_slice<'b>(&'b self, start: usize, end: usize) -> Parser<'a>[src]

pub fn slice_until_linebreak<'b>(&'b mut self) -> Parser<'a>[src]

pub fn slice_until_token<'b>(&'b mut self, kind: TokenKind) -> Parser<'a>[src]

pub fn slice_until_char<'b>(&'b mut self, c: char) -> Option<Parser<'a>>[src]

pub fn slice_until_char_or_nesting<'b>(
    &'b mut self,
    c: char
) -> Option<Parser<'a>>
[src]

pub fn save(&self) -> ParserState[src]

pub fn restore(&mut self, state: ParserState)[src]

pub fn is_over(&self) -> bool[src]

pub fn advance(&mut self) -> Token[src]

pub fn advance_partial(&mut self) -> char[src]

pub fn skip_until_linebreak(&mut self)[src]

pub fn next(&self) -> Token[src]

pub fn next_partial(&mut self) -> char[src]

pub fn prev(&self) -> Token[src]

pub fn clear_linebreak(&mut self)[src]

pub fn is_at_partial(&self) -> bool[src]

pub fn next_is(&self, nth: usize, kind: TokenKind) -> bool[src]

pub fn maybe_expect(&mut self, kind: TokenKind) -> Option<Token>[src]

pub fn expect(&mut self, kind: TokenKind) -> Result<Token, ()>[src]

pub fn expect_msg<S>(&mut self, kind: TokenKind, descr: S) -> Result<Token, ()> where
    S: Into<String>, 
[src]

pub fn next_is_linebreak(&self) -> bool[src]

pub fn maybe_expect_linebreak(&mut self) -> Option<()>[src]

pub fn expect_linebreak(&mut self) -> Result<(), ()>[src]

pub fn expect_linebreak_or(&mut self, kind: TokenKind) -> Result<(), ()>[src]

pub fn expect_usize(&mut self) -> Result<(Token, usize), ()>[src]

pub fn maybe_expect_partial_usize(&mut self) -> Option<usize>[src]

Trait Implementations

impl<'a> Clone for Parser<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Parser<'a>

impl<'a> !Send for Parser<'a>

impl<'a> !Sync for Parser<'a>

impl<'a> Unpin for Parser<'a>

impl<'a> !UnwindSafe for Parser<'a>

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> 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.