Struct glsl_lang_pp::processor::definition::MacroInvocation
source · pub struct MacroInvocation<'d> {
definition: &'d Definition,
tokens: MacroCall,
range: NodeSpan,
}
Fields§
§definition: &'d Definition
§tokens: MacroCall
§range: NodeSpan
Implementations§
source§impl<'d> MacroInvocation<'d>
impl<'d> MacroInvocation<'d>
pub fn parse_raw<I>( definition: &'d Definition, first_token: SyntaxToken<PreprocessorLang>, iterator: I, location: &ExpandLocation, ) -> Result<Option<(MacroInvocation<'d>, I)>, ProcessingError>
fn parse_nested<I, Q, P>( definition: &'d Definition, first_token: Q, iterator: I, location: &ExpandLocation, text_range: Option<NodeSpan>, token_fn: impl Fn(Q) -> P, ) -> Result<Option<(Self, I)>, ProcessingError>
pub fn substitute_vec( current_state: &ProcessorState, tokens: Vec<impl TokenLike>, location: &ExpandLocation, ) -> Vec<Event>
fn substitute_vec_inner( current_state: &ProcessorState, tokens: Vec<impl TokenLike>, location: &ExpandLocation, subs_stack: &mut HashSet<SmolStr>, range: Option<NodeSpan>, ) -> Vec<Event>
pub fn substitute( self, current_state: &ProcessorState, location: &ExpandLocation, ) -> Vec<Event>
fn substitute_inner( self, current_state: &ProcessorState, location: &ExpandLocation, subs_stack: &mut HashSet<SmolStr>, ) -> Vec<Event>
Auto Trait Implementations§
impl<'d> Freeze for MacroInvocation<'d>
impl<'d> !RefUnwindSafe for MacroInvocation<'d>
impl<'d> !Send for MacroInvocation<'d>
impl<'d> !Sync for MacroInvocation<'d>
impl<'d> Unpin for MacroInvocation<'d>
impl<'d> !UnwindSafe for MacroInvocation<'d>
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