pub struct TokenizeState {
pub max_string_len: Option<NonZeroUsize>,
pub next_token_cannot_be_unary: bool,
pub tokenizer_control: TokenizerControl,
pub comment_level: usize,
pub include_comments: bool,
pub is_within_text_terminated_by: Option<char>,
pub last_token: Option<SmartString<LazyCompact>>,
}Expand description
(internals) State of the tokenizer.
Exported under the internals feature only.
Fields§
§max_string_len: Option<NonZeroUsize>Maximum length of a string.
Not available under unchecked.
next_token_cannot_be_unary: boolCan the next token be a unary operator?
tokenizer_control: TokenizerControlShared object to allow controlling the tokenizer externally.
comment_level: usizeIs the tokenizer currently inside a block comment?
include_comments: boolInclude comments?
is_within_text_terminated_by: Option<char>Is the current tokenizer position within the text stream of an interpolated string?
last_token: Option<SmartString<LazyCompact>>Textual syntax of the current token, if any.
Set to Some to begin tracking this information.
Trait Implementations§
Source§impl Clone for TokenizeState
impl Clone for TokenizeState
Source§fn clone(&self) -> TokenizeState
fn clone(&self) -> TokenizeState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenizeState
impl Debug for TokenizeState
Source§impl Default for TokenizeState
impl Default for TokenizeState
Source§fn default() -> TokenizeState
fn default() -> TokenizeState
Returns the “default value” for a type. Read more
Source§impl PartialEq for TokenizeState
impl PartialEq for TokenizeState
impl Eq for TokenizeState
impl StructuralPartialEq for TokenizeState
Auto Trait Implementations§
impl Freeze for TokenizeState
impl !RefUnwindSafe for TokenizeState
impl !Send for TokenizeState
impl !Sync for TokenizeState
impl Unpin for TokenizeState
impl !UnwindSafe for TokenizeState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Variant for T
impl<T> Variant for T
Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert this
Variant trait object to &mut dyn Any.Source§fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
Convert this
Variant trait object to Box<dyn Any>.