Struct glsl_lang_lexer::v2_full::core::LexerCore
source · pub struct LexerCore {
pub ctx: ParseContext,
file_id: FileId,
opts: ParseOptions,
directives: Vec<EventDirective>,
}
Fields§
§ctx: ParseContext
§file_id: FileId
§opts: ParseOptions
§directives: Vec<EventDirective>
Implementations§
source§impl LexerCore
impl LexerCore
pub fn new(opts: &ParseOptions, ctx: ParseContext) -> Self
fn lang_token( &self, source_token: &OutputToken, token_kind: Token, ) -> Result<(LexerPosition, Token, LexerPosition), (Token, ErrorKind)>
pub fn handle_file_id(&mut self, file_id: FileId)
pub fn handle_token<'r, I, E>( &self, source_token: OutputToken, token_kind: Token, state: TokenState, tokenizer: &mut Tokenizer<'r, I>, token_state: &mut HandleTokenResult<E>, )
pub fn into_directives(self) -> Directives
pub fn handle_directive( &mut self, directive: EventDirective, masked: bool, ) -> Result<(), Vec<Error>>
Auto Trait Implementations§
impl Freeze for LexerCore
impl !RefUnwindSafe for LexerCore
impl !Send for LexerCore
impl !Sync for LexerCore
impl Unpin for LexerCore
impl !UnwindSafe for LexerCore
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