[][src]Enum minifier::js::Token

pub enum Token<'a> {
    Keyword(Keyword),
    Char(ReservedChar),
    String(&'a str),
    Comment(&'a str),
    License(&'a str),
    Other(&'a str),
    Regex {
        regex: &'a str,
        is_global: bool,
        is_interactive: bool,
    },
    Condition(Condition),
    Operation(Operation),
    CreatedVarDecl(String),
    CreatedVar(String),
    Number(usize),
    FloatingNumber(&'a str),
}

Variants

Keyword(Keyword)Char(ReservedChar)String(&'a str)Comment(&'a str)License(&'a str)Other(&'a str)Regex

Fields of Regex

regex: &'a stris_global: boolis_interactive: bool
Condition(Condition)Operation(Operation)CreatedVarDecl(String)CreatedVar(String)Number(usize)FloatingNumber(&'a str)

Methods

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

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

pub fn get_char(&self) -> Option<ReservedChar>
[src]

pub fn is_char(&self, rc: ReservedChar) -> bool
[src]

pub fn is_operation(&self, ope: Operation) -> bool
[src]

pub fn is_condition(&self, cond: Condition) -> bool
[src]

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

pub fn get_other(&self) -> Option<&str>
[src]

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

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

pub fn get_keyword(&self) -> Option<Keyword>
[src]

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

pub fn get_string(&self) -> Option<&str>
[src]

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

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

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

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

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

Trait Implementations

impl<'a> Eq for Token<'a>
[src]

impl<'a> PartialOrd<Token<'a>> for Token<'a>
[src]

impl<'a> PartialEq<Token<'a>> for Token<'a>
[src]

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

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for Token<'a>
[src]

impl<'a> Display for Token<'a>
[src]

impl<'a> Hash for Token<'a>
[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl<'a> Send for Token<'a>

impl<'a> Sync for Token<'a>

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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