[][src]Struct dass::tokens::TokenMatcher

pub struct TokenMatcher<T: Clone + Display> {
    pub regex: Regex,
    pub tag: T,
    pub skip: bool,
}

Fields

regex: Regextag: Tskip: bool

Methods

impl<T: Clone + Display> TokenMatcher<T>[src]

pub fn new(regex: Regex, tag: T, skip: bool) -> TokenMatcher<T>[src]

pub fn parse(&self, contents: &str, line: u64, character: u64) -> TokenData<T>[src]

pub fn regex(regex: Regex, tag: T) -> TokenMatcher<T>[src]

pub fn whitespace(tag: T) -> TokenMatcher<T>[src]

pub fn whitespace_with_newlines(tag: T) -> TokenMatcher<T>[src]

pub fn constant(symbol: &str, tag: T) -> TokenMatcher<T>[src]

pub fn operators(symbols: &str, tag: T) -> TokenMatcher<T>[src]

pub fn float(tag: T) -> TokenMatcher<T>[src]

pub fn number(tag: T) -> TokenMatcher<T>[src]

pub fn integer(tag: T) -> TokenMatcher<T>[src]

Trait Implementations

impl<T: Clone + Display> Clone for TokenMatcher<T>[src]

impl<T: Debug + Clone + Display> Debug for TokenMatcher<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for TokenMatcher<T>

impl<T> Send for TokenMatcher<T> where
    T: Send

impl<T> Sync for TokenMatcher<T> where
    T: Sync

impl<T> Unpin for TokenMatcher<T> where
    T: Unpin

impl<T> UnwindSafe for TokenMatcher<T> where
    T: UnwindSafe

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.