[−][src]Struct ress::Tokenizer
This structure will perform the low level
tokenization before the Scanner
provides
additional context
Methods
impl<'a> Tokenizer<'a>
[src]
pub fn new(stream: &'a str) -> Self
[src]
Create a new tokenizer using
the provided string reference
to create a JsBuffer
pub fn next(
&mut self,
allow_html_comment_close: bool
) -> Result<RawItem, RawError>
[src]
&mut self,
allow_html_comment_close: bool
) -> Result<RawItem, RawError>
Get the next raw token from the js text
pub fn next_regex(&mut self, start_len: usize) -> Result<RawItem, RawError>
[src]
get the next regex token from the js text, providing the lenth of the already consumed token (this will be either 1 or 2)
note: this should only be used after first getting /
or /=
from the next
method.
pub fn skip_whitespace(&mut self) -> (usize, usize)
[src]
Skip any whitespace that might be coming up
Auto Trait Implementations
impl<'a> Send for Tokenizer<'a>
impl<'a> Sync for Tokenizer<'a>
impl<'a> Unpin for Tokenizer<'a>
impl<'a> UnwindSafe for Tokenizer<'a>
impl<'a> RefUnwindSafe for Tokenizer<'a>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,