[][src]Struct ress::Item

pub struct Item {
    pub token: Token,
    pub span: Span,
}

A wrapper around a token that will include the byte span of the text that it was found at

Fields

token: Tokenspan: Span

Methods

impl Item
[src]

pub fn new(token: Token, span: Span) -> Item
[src]

Create a new Item from its parts

Methods from Deref<Target = Token>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pub fn matches_boolean(&self, b: BooleanLiteral) -> bool
[src]

pub fn matches_boolean_str(&self, b: &str) -> bool
[src]

pub fn matches_ident_str(&self, name: &str) -> bool
[src]

pub fn matches_keyword(&self, keyword: Keyword) -> bool
[src]

pub fn matches_keyword_str(&self, name: &str) -> bool
[src]

pub fn matches_numeric(&self, number: Number) -> bool
[src]

pub fn matches_numeric_str(&self, number: &str) -> bool
[src]

pub fn matches_punct(&self, p: Punct) -> bool
[src]

pub fn matches_punct_str(&self, s: &str) -> bool
[src]

pub fn matches_regex(&self, regex: RegEx) -> bool
[src]

pub fn matches_regex_str(&self, regex: &str) -> bool
[src]

pub fn matches_comment(&self, comment: Comment) -> bool
[src]

pub fn matches_comment_str(&self, comment: &str) -> bool
[src]

pub fn matches_string_content(&self, content: &str) -> bool
[src]

Trait Implementations

impl Clone for Item
[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<Item> for Item
[src]

impl Debug for Item
[src]

impl Deref for Item
[src]

type Target = Token

The resulting type after dereferencing.

Auto Trait Implementations

impl Send for Item

impl Sync for Item

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, 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, 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> BorrowMut for T where
    T: ?Sized
[src]

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