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: Body,
else_body: Option<Body>,
},
For {
var: String,
subscript: Option<Expr>,
from: Expr,
to: Expr,
by: Expr,
mult: bool,
body: Body,
},
Print(PrintItem),
Exec {
command: StringExpr,
arg_frame: Option<Vec<Vec<Spanned>>>,
},
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 { … }]. Bodies are deferred raw tokens.
For
for v = from to to [by [*] step] do { … }. Body is deferred raw tokens.
Fields
Print(PrintItem)
print … (evaluated for diagnostics; no drawing effect).
Exec
exec <string> — evaluate generated pic source in the current state.
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