pub enum Stmt {
Object {
label: Option<Label>,
object: Object,
},
Place {
label: Label,
pos: Position,
},
Assign(Vec<Assignment>),
Direction(Dir),
Group(Vec<Stmt>),
Animate(Animate),
If {
cond: Expr,
then_body: Vec<Stmt>,
else_body: Option<Vec<Stmt>>,
},
For {
var: String,
from: Expr,
to: Expr,
by: Expr,
mult: bool,
body: Vec<Stmt>,
},
Print(PrintItem),
Reset(Vec<EnvVar>),
}Expand description
A top-level element.
Variants§
Object
A drawn object, optionally labelled (Start: box …).
Place
Label: position — names a point without drawing.
Assign(Vec<Assignment>)
One or more comma-separated assignments.
Direction(Dir)
A bare direction change (up / down / left / right).
Group(Vec<Stmt>)
{ … } grouping block (local scope, no bounding object).
Animate(Animate)
rpic animation directive (extension; see Animate).
If
if <cond> then { … } [else { … }].
For
for v = from to to [by [*] step] do { … }.
Fields
Print(PrintItem)
print … (evaluated for diagnostics; no drawing effect).
Reset(Vec<EnvVar>)
reset (all) or reset a, b, … — restore environment variables.
Trait Implementations§
impl StructuralPartialEq for Stmt
Auto Trait Implementations§
impl Freeze for Stmt
impl RefUnwindSafe for Stmt
impl Send for Stmt
impl Sync for Stmt
impl Unpin for Stmt
impl UnsafeUnpin for Stmt
impl UnwindSafe for Stmt
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