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>

source

pub fn parse_raw<I>( definition: &'d Definition, first_token: SyntaxToken<PreprocessorLang>, iterator: I, location: &ExpandLocation, ) -> Result<Option<(MacroInvocation<'d>, I)>, ProcessingError>
where I: Iterator<Item = NodeOrToken<SyntaxNode<PreprocessorLang>, SyntaxToken<PreprocessorLang>>>,

source

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>
where I: Iterator<Item = NodeOrToken<SyntaxNode<PreprocessorLang>, Q>>, P: TokenLike,

source

pub fn substitute_vec( current_state: &ProcessorState, tokens: Vec<impl TokenLike>, location: &ExpandLocation, ) -> Vec<Event>

source

fn substitute_vec_inner( current_state: &ProcessorState, tokens: Vec<impl TokenLike>, location: &ExpandLocation, subs_stack: &mut HashSet<SmolStr>, range: Option<NodeSpan>, ) -> Vec<Event>

source

pub fn substitute( self, current_state: &ProcessorState, location: &ExpandLocation, ) -> Vec<Event>

source

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.