pub enum Statement {
Compound(Box<CompoundStatement>),
Simple(Box<SimpleStatement>),
}
Expand description
Statement.
Variants§
Compound(Box<CompoundStatement>)
Simple(Box<SimpleStatement>)
Implementations§
source§impl Statement
impl Statement
sourcepub fn new_case<C, S>(case: C, statements: S) -> Self
pub fn new_case<C, S>(case: C, statements: S) -> Self
Create a case-label sequence of nested statements.
sourcepub fn declare_var<T, N, A, I>(
ty: T,
name: N,
array_specifier: A,
initializer: I
) -> Selfwhere
T: Into<FullySpecifiedType>,
N: Into<Identifier>,
A: Into<Option<ArraySpecifier>>,
I: Into<Option<Initializer>>,
pub fn declare_var<T, N, A, I>(
ty: T,
name: N,
array_specifier: A,
initializer: I
) -> Selfwhere
T: Into<FullySpecifiedType>,
N: Into<Identifier>,
A: Into<Option<ArraySpecifier>>,
I: Into<Option<Initializer>>,
Declare a new variable.
ty
is the type of the variable, name
the name of the binding to create,
array_specifier
an optional argument to make your binding an array and
initializer
Trait Implementations§
source§impl FromIterator<Statement> for CompoundStatement
impl FromIterator<Statement> for CompoundStatement
source§impl HostMut for Statement
impl HostMut for Statement
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 PartialEq for Statement
impl PartialEq for Statement
impl StructuralPartialEq for Statement
Auto Trait Implementations§
impl RefUnwindSafe for Statement
impl Send for Statement
impl Sync for Statement
impl Unpin for Statement
impl UnwindSafe for Statement
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