pub enum ExternalDeclaration {
Preprocessor(Preprocessor),
FunctionDefinition(FunctionDefinition),
Declaration(Declaration),
}
Expand description
External declaration.
Variants§
Implementations§
Source§impl ExternalDeclaration
impl ExternalDeclaration
Sourcepub fn new_fn<T, N, A, S>(ret_ty: T, name: N, args: A, body: S) -> Selfwhere
T: Into<FullySpecifiedType>,
N: Into<Identifier>,
A: IntoIterator<Item = FunctionParameterDeclaration>,
S: IntoIterator<Item = Statement>,
pub fn new_fn<T, N, A, S>(ret_ty: T, name: N, args: A, body: S) -> Selfwhere
T: Into<FullySpecifiedType>,
N: Into<Identifier>,
A: IntoIterator<Item = FunctionParameterDeclaration>,
S: IntoIterator<Item = Statement>,
Create a new function.
Sourcepub fn new_struct<N, F>(name: N, fields: F) -> Option<Self>
pub fn new_struct<N, F>(name: N, fields: F) -> Option<Self>
Trait Implementations§
Source§impl Clone for ExternalDeclaration
impl Clone for ExternalDeclaration
Source§fn clone(&self) -> ExternalDeclaration
fn clone(&self) -> ExternalDeclaration
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 ExternalDeclaration
impl Debug for ExternalDeclaration
Source§impl Host for ExternalDeclaration
impl Host for ExternalDeclaration
Source§impl HostMut for ExternalDeclaration
impl HostMut for ExternalDeclaration
Source§fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
fn visit_mut<V>(&mut self, visitor: &mut V)where
V: VisitorMut,
Visit an AST node.
Source§impl Parse for ExternalDeclaration
impl Parse for ExternalDeclaration
Source§impl PartialEq for ExternalDeclaration
impl PartialEq for ExternalDeclaration
impl StructuralPartialEq for ExternalDeclaration
Auto Trait Implementations§
impl Freeze for ExternalDeclaration
impl RefUnwindSafe for ExternalDeclaration
impl Send for ExternalDeclaration
impl Sync for ExternalDeclaration
impl Unpin for ExternalDeclaration
impl UnwindSafe for ExternalDeclaration
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