Struct glsl_lang_lexer::v2_full::str::Lexer
source · pub struct Lexer<'i> {
inner: Tokenizer<'i, ExpandStr>,
handle_token: HandleTokenResult<ProcessStrError>,
opts: ParseOptions,
}
Expand description
glsl-lang-pp memory lexer
Fields§
§inner: Tokenizer<'i, ExpandStr>
§handle_token: HandleTokenResult<ProcessStrError>
§opts: ParseOptions
Implementations§
source§impl<'i> Lexer<'i>
impl<'i> Lexer<'i>
pub(crate) fn new_with_state( source: &'i str, registry: &'i Registry, opts: &ParseOptions, state: ProcessorState, ) -> Self
fn with_context(self, ctx: ParseContext) -> LexerIterator<'i> ⓘ
Trait Implementations§
source§impl HasLexerError for Lexer<'_>
impl HasLexerError for Lexer<'_>
source§type Error = LexicalError<ProcessStrError>
type Error = LexicalError<ProcessStrError>
Type of lexical analysis error
Auto Trait Implementations§
impl<'i> Freeze for Lexer<'i>
impl<'i> !RefUnwindSafe for Lexer<'i>
impl<'i> !Send for Lexer<'i>
impl<'i> !Sync for Lexer<'i>
impl<'i> Unpin for Lexer<'i>
impl<'i> !UnwindSafe for Lexer<'i>
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more