Struct glsl_lang_lexer::v2_full::fs::Lexer
source · pub struct Lexer<'r, 'p, F: FileSystem> {
inner: Tokenizer<'r, ExpandStack<'p, F>>,
current_file: PathBuf,
handle_token: HandleTokenResult<F::Error>,
opts: ParseOptions,
}
Expand description
glsl-lang-pp filesystem lexer
Fields§
§inner: Tokenizer<'r, ExpandStack<'p, F>>
§current_file: PathBuf
§handle_token: HandleTokenResult<F::Error>
§opts: ParseOptions
Implementations§
source§impl<'r, 'p, F: FileSystem> Lexer<'r, 'p, F>
impl<'r, 'p, F: FileSystem> Lexer<'r, 'p, F>
fn new( inner: ExpandStack<'p, F>, registry: &'r Registry, opts: &ParseOptions, ) -> Self
fn with_context(self, ctx: ParseContext) -> LexerIterator<'r, 'p, F> ⓘ
Trait Implementations§
source§impl<F: FileSystem> HasLexerError for Lexer<'_, '_, F>
impl<F: FileSystem> HasLexerError for Lexer<'_, '_, F>
source§type Error = LexicalError<<F as FileSystem>::Error>
type Error = LexicalError<<F as FileSystem>::Error>
Type of lexical analysis error
source§impl<'r, 'p, F: FileSystem> LangLexer<'p> for Lexer<'r, 'p, F>where
File<'r, 'p, F>: 'p,
impl<'r, 'p, F: FileSystem> LangLexer<'p> for Lexer<'r, 'p, F>where
File<'r, 'p, F>: 'p,
source§type Iter = LexerIterator<'r, 'p, F>
type Iter = LexerIterator<'r, 'p, F>
Type of the iterator returned by this lexer
source§fn run(self, ctx: ParseContext) -> Self::Iter
fn run(self, ctx: ParseContext) -> Self::Iter
Run the lexer
Auto Trait Implementations§
impl<'r, 'p, F> Freeze for Lexer<'r, 'p, F>
impl<'r, 'p, F> !RefUnwindSafe for Lexer<'r, 'p, F>
impl<'r, 'p, F> !Send for Lexer<'r, 'p, F>
impl<'r, 'p, F> !Sync for Lexer<'r, 'p, F>
impl<'r, 'p, F> Unpin for Lexer<'r, 'p, F>
impl<'r, 'p, F> !UnwindSafe for Lexer<'r, 'p, F>
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