Enum AstDeclaratorKind
pub enum AstDeclaratorKind {
Ident(AstIdentifier),
Pointer(Box<AstDeclarator>),
Array {
decl: Box<AstDeclarator>,
size_expr: Option<Box<AstExpression>>,
},
Function {
decl: Box<AstDeclarator>,
params: Vec<AstDeclaredType>,
},
AbstractPointer,
AbstractArray {
size_expr: Option<Box<AstExpression>>,
},
AbstractFunction {
params: Vec<AstDeclaredType>,
},
}Expand description
The kind of declarator.
A declarator is an ‘abstract declarator’ if it has no identifier.
// Declarator // Abstract declarator
int x int
int *p int *
int arr[10] int [10]
int (*ptr)[5] int (*)[5]
int func(void) int (void)
int (*fnptr)(void) int (*)(void)Variants§
Ident(AstIdentifier)
Pointer(Box<AstDeclarator>)
Array
Function
AbstractPointer
AbstractArray
Fields
§
size_expr: Option<Box<AstExpression>>AbstractFunction
Fields
§
params: Vec<AstDeclaredType>Trait Implementations§
§impl Clone for AstDeclaratorKind
impl Clone for AstDeclaratorKind
§fn clone(&self) -> AstDeclaratorKind
fn clone(&self) -> AstDeclaratorKind
Returns a duplicate 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 more§impl Debug for AstDeclaratorKind
impl Debug for AstDeclaratorKind
§impl PartialEq for AstDeclaratorKind
impl PartialEq for AstDeclaratorKind
impl StructuralPartialEq for AstDeclaratorKind
Auto Trait Implementations§
impl Freeze for AstDeclaratorKind
impl RefUnwindSafe for AstDeclaratorKind
impl Send for AstDeclaratorKind
impl Sync for AstDeclaratorKind
impl Unpin for AstDeclaratorKind
impl UnwindSafe for AstDeclaratorKind
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