Skip to main content

Tokenizer

Struct Tokenizer 

Source
pub struct Tokenizer<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Tokenizer<'a>

Source

pub fn new(input: &'a str) -> Self

Source

pub fn consume_token(&mut self) -> CSSToken

Source

pub fn is_parse_error(&mut self) -> bool

Source

pub fn consume_ident_like_token(&mut self) -> CSSToken

Source

pub fn consume_url_token(&mut self) -> CSSToken

Source

pub fn is_none_printable_code_point(input: char) -> bool

Source

pub fn consume_remnants_of_bad_url(&mut self)

Source

pub fn consume_numeric_token(&mut self) -> CSSToken

Source

pub fn consume_number(&mut self) -> Number

Source

pub fn string_to_number(input: String) -> f64

Source

pub fn is_plus_or_minus(input: char) -> bool

Source

pub fn is_e(input: char) -> bool

Source

pub fn would_start_number(&mut self) -> bool

Source

pub fn consume_ident_sequence(&mut self) -> String

Source

pub fn would_start_ident_sequence(&mut self) -> bool

Source

pub fn is_ident_code_point(input: Option<char>) -> bool

Source

pub fn is_ident_start_code_point(input: char) -> bool

Source

pub fn is_letter(input: char) -> bool

Source

pub fn is_uppercase_letter(input: char) -> bool

Source

pub fn is_lowercase_letter(input: char) -> bool

Source

pub fn is_none_ascii(input: char) -> bool

Source

pub fn consume_string_token(&mut self, code_point: char) -> CSSToken

Source

pub fn is_newline(input: char) -> bool

Source

pub fn peek_twin(&mut self) -> (Option<char>, Option<char>)

Source

pub fn consume_escaped_code_point(&mut self) -> char

Source

pub fn max_allowed_code_point() -> u32

Source

pub fn is_surrogate(input: u32) -> bool

Source

pub fn is_leading_surrogate(input: u32) -> bool

Source

pub fn is_trailing_surrogate(input: u32) -> bool

Source

pub fn code_point_to_char(input: &str) -> char

Source

pub fn is_digit(input: char) -> bool

Source

pub fn is_hex_digit(input: char) -> bool

Source

pub fn is_valid_escape(first: Option<char>, second: Option<char>) -> bool

Source

pub fn consume_whitespace(&mut self)

Source

pub fn is_whitespace(input: char) -> bool

Source

pub fn consume_comments(&mut self)

Source

pub fn parse_error(&mut self)

Source

pub fn tokenize(&mut self) -> Vec<CSSToken>

Auto Trait Implementations§

§

impl<'a> Forget for Tokenizer<'a>

§

impl<'a> Freeze for Tokenizer<'a>

§

impl<'a> RefUnwindSafe for Tokenizer<'a>

§

impl<'a> Send for Tokenizer<'a>

§

impl<'a> Sync for Tokenizer<'a>

§

impl<'a> Unpin for Tokenizer<'a>

§

impl<'a> UnsafeUnpin for Tokenizer<'a>

§

impl<'a> UnwindSafe for Tokenizer<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.