Enum hemtt_preprocessor::Definition
source · pub enum Definition {
Function(FunctionDefinition),
Value(Vec<Token>),
Unit(Vec<Token>),
}
Expand description
A macro definition
Variants§
Function(FunctionDefinition)
A FunctionDefinition
that takes parameters
Value(Vec<Token>)
A value that is a list of Token
s to be added at the call site
Unit(Vec<Token>)
A flag that can be checked with #ifdef
Tokens are only used for error reporting
Implementations§
source§impl Definition
impl Definition
sourcepub const fn is_function(&self) -> bool
pub const fn is_function(&self) -> bool
Check if the definition is a FunctionDefinition
Trait Implementations§
source§impl Clone for Definition
impl Clone for Definition
source§fn clone(&self) -> Definition
fn clone(&self) -> Definition
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Definition
impl Debug for Definition
source§impl PartialEq<Definition> for Definition
impl PartialEq<Definition> for Definition
source§fn eq(&self, other: &Definition) -> bool
fn eq(&self, other: &Definition) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.