pub enum Decl {
GlobalVariable {
name: String,
index: Option<u32>,
span: Span,
name_span: Span,
initializer: Option<Expr>,
},
PlayerVariable {
name: String,
index: Option<u32>,
span: Span,
name_span: Span,
initializer: Option<Expr>,
},
Subroutine {
name: String,
span: Span,
name_span: Span,
},
Enum {
name: String,
members: Vec<(String, Span)>,
span: Span,
},
Macro {
name: String,
args: Vec<String>,
body: Vec<Stmt>,
span: Span,
},
}Expand description
A program-scope declaration.
Variants§
GlobalVariable
Fields
PlayerVariable
Fields
Subroutine
Enum
A user-defined enum; members fold to numeric constants.
Macro
A macro declaration with parameterized statement body.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decl
impl RefUnwindSafe for Decl
impl Send for Decl
impl Sync for Decl
impl Unpin for Decl
impl UnsafeUnpin for Decl
impl UnwindSafe for Decl
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