pub enum Stmt {
FunctionDef {
fntype: FnType,
name: OwnedTk,
arguments: Vec<Expr>,
body: Box<Stmt>,
},
Block(Vec<Stmt>),
ClassDef {
name: OwnedTk,
bases: Vec<Expr>,
body: Box<Stmt>,
},
Return(Option<Expr>),
Delete(Vec<Expr>),
Assign {
target: Expr,
value: Expr,
},
AugAssign {
target: Expr,
op: Op,
value: Expr,
},
Import,
ImportFrom,
Global(Vec<OwnedTk>),
Nonlocal(Vec<OwnedTk>),
Assert {
test: Expr,
message: Option<Expr>,
},
Expr(Expr),
Pass,
Break,
Continue,
Newline(usize),
}
Variants
FunctionDef
Fields of FunctionDef
Block(Vec<Stmt>)
ClassDef
Fields of ClassDef
Return(Option<Expr>)
Delete(Vec<Expr>)
Assign
Fields of Assign
AugAssign
Fields of AugAssign
Import
ImportFrom
Global(Vec<OwnedTk>)
Nonlocal(Vec<OwnedTk>)
Assert
Fields of Assert
Expr(Expr)
Pass
Break
Continue
Newline(usize)
Trait Implementations
Formats the value using the given formatter.
fn eq(&self, __arg_0: &Stmt) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Stmt) -> bool
This method tests for !=
.