pub enum Stmt<'a> {
Assign {
name: &'a str,
shadow: bool,
value: Expr<'a>,
span: Span,
},
Property {
key: &'a str,
value: Expr<'a>,
span: Span,
},
Assert {
cond: Expr<'a>,
message: Option<Expr<'a>>,
span: Span,
},
TypeDecl(SchemaDeclaration<'a>),
EnumDecl(EnumDeclaration<'a>),
FuncDecl {
name: &'a str,
params: Vec<&'a str>,
body: Vec<Stmt<'a>>,
public: bool,
span: Span,
},
Block(BlockDeclaration<'a>),
Expr(Expr<'a>),
}Variants§
Assign
[shadow] name = expr (D7)
Property
key: expr | key: + an object block - inside domain/component
Assert
assert cond[, "msg"] (D5)
TypeDecl(SchemaDeclaration<'a>)
EnumDecl(EnumDeclaration<'a>)
D18: [pub] enum Name — a closed set of allowed string values
FuncDecl
[pub] def ... - public is exported to the module’s importers (D12)
Fields
Block(BlockDeclaration<'a>)
Expr(Expr<'a>)
Trait Implementations§
impl<'a> StructuralPartialEq for Stmt<'a>
Auto Trait Implementations§
impl<'a> Freeze for Stmt<'a>
impl<'a> RefUnwindSafe for Stmt<'a>
impl<'a> Send for Stmt<'a>
impl<'a> Sync for Stmt<'a>
impl<'a> Unpin for Stmt<'a>
impl<'a> UnsafeUnpin for Stmt<'a>
impl<'a> UnwindSafe for Stmt<'a>
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