pub enum Command {
Show 24 variants
Decl(Decl),
Import {
module: String,
span: Span,
},
Export {
names: Vec<String>,
span: Span,
},
Namespace {
name: String,
span: Span,
},
End {
span: Span,
},
SetOption {
name: String,
value: String,
span: Span,
},
Open {
path: Vec<String>,
items: Vec<OpenItem>,
span: Span,
},
Section {
name: String,
span: Span,
},
Variable {
binders: Vec<Binder>,
span: Span,
},
Attribute {
attrs: Vec<String>,
name: String,
span: Span,
},
Check {
expr_str: String,
span: Span,
},
Eval {
expr_str: String,
span: Span,
},
Print {
name: String,
span: Span,
},
Reduce {
expr_str: String,
span: Span,
},
Universe {
names: Vec<String>,
span: Span,
},
Notation {
kind: NotationKind,
name: String,
prec: Option<u32>,
body: String,
span: Span,
},
Derive {
strategies: Vec<String>,
type_name: String,
span: Span,
},
Structure {
name: String,
extends: Vec<String>,
fields: Vec<StructureField>,
derives: Vec<String>,
span: Span,
},
Class {
name: String,
params: Vec<Binder>,
extends: Vec<String>,
fields: Vec<StructureField>,
span: Span,
},
Instance {
name: String,
ty: String,
priority: Option<u32>,
body: String,
span: Span,
},
AttributeDecl {
name: String,
kind: AttributeDeclKind,
span: Span,
},
ApplyAttribute {
attr_name: String,
target: String,
params: Vec<String>,
span: Span,
},
Syntax {
name: String,
prec: Option<u32>,
pattern: String,
span: Span,
},
Precedence {
name: String,
level: u32,
span: Span,
},
}Expand description
A top-level command.
Variants§
Decl(Decl)
Declaration command
Import
Import command
Export
Export command
Namespace
Namespace command
End
End namespace/section command
SetOption
Set option command
Open
Open namespace command
Fields
Section
Section command
Variable
Variable declaration
Attribute
Attribute command
Check
Check command (#check)
Eval
Eval command (#eval)
Print command (#print)
Reduce
Reduce command (#reduce)
Universe
Universe declaration
Notation
Notation declaration
Fields
§
kind: NotationKindNotation kind
Derive
Derive command
Fields
Structure
Structure command with fields and optional extends
Fields
§
fields: Vec<StructureField>Field declarations
Class
Class command
Fields
§
fields: Vec<StructureField>Methods/fields
Instance
Instance declaration with priority
Fields
AttributeDecl
Attribute declaration
ApplyAttribute
Attribute application
Fields
Syntax
Syntax command
Fields
Precedence
Precedence declaration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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