pub enum Stmt {
Show 48 variants Assign { vars: Vec<VariableRef>, value: Expr, comment: Option<String>, }, AddAssign { var: VariableRef, value: Expr, comment: Option<String>, }, Warp { stmts: Vec<Stmt>, comment: Option<String>, }, InfLoop { stmts: Vec<Stmt>, comment: Option<String>, }, ForeachLoop { var: VariableRef, items: Expr, stmts: Vec<Stmt>, comment: Option<String>, }, ForLoop { var: VariableRef, start: Expr, stop: Expr, stmts: Vec<Stmt>, comment: Option<String>, }, UntilLoop { condition: Expr, stmts: Vec<Stmt>, comment: Option<String>, }, Repeat { times: Expr, stmts: Vec<Stmt>, comment: Option<String>, }, If { condition: Expr, then: Vec<Stmt>, comment: Option<String>, }, IfElse { condition: Expr, then: Vec<Stmt>, otherwise: Vec<Stmt>, comment: Option<String>, }, Push { list: Expr, value: Expr, comment: Option<String>, }, InsertAt { list: Expr, value: Expr, index: Expr, comment: Option<String>, }, InsertAtRand { list: Expr, value: Expr, comment: Option<String>, }, Pop { list: Expr, comment: Option<String>, }, RemoveAt { list: Expr, index: Expr, comment: Option<String>, }, RemoveAll { list: Expr, comment: Option<String>, }, IndexAssign { list: Expr, value: Expr, index: Expr, comment: Option<String>, }, RandIndexAssign { list: Expr, value: Expr, comment: Option<String>, }, LastIndexAssign { list: Expr, value: Expr, comment: Option<String>, }, Return { value: Expr, comment: Option<String>, }, Sleep { seconds: Expr, comment: Option<String>, }, WaitUntil { condition: Expr, comment: Option<String>, }, SwitchCostume { costume: Option<Expr>, comment: Option<String>, }, Forward { distance: Expr, comment: Option<String>, }, ChangePos { dx: Option<Expr>, dy: Option<Expr>, comment: Option<String>, }, SetPos { x: Option<Expr>, y: Option<Expr>, comment: Option<String>, }, Goto { target: Expr, comment: Option<String>, }, TurnRight { angle: Expr, comment: Option<String>, }, TurnLeft { angle: Expr, comment: Option<String>, }, SetHeading { value: Expr, comment: Option<String>, }, BounceOffEdge { comment: Option<String>, }, PenDown { comment: Option<String>, }, PenUp { comment: Option<String>, }, PenClear { comment: Option<String>, }, Stamp { comment: Option<String>, }, Write { content: Expr, font_size: Expr, comment: Option<String>, }, SetPenColor { color: (u8, u8, u8), comment: Option<String>, }, Say { content: Expr, duration: Option<Expr>, comment: Option<String>, }, Think { content: Expr, duration: Option<Expr>, comment: Option<String>, }, SetVisible { value: bool, comment: Option<String>, }, ChangeScalePercent { amount: Expr, comment: Option<String>, }, SetScalePercent { value: Expr, comment: Option<String>, }, ChangePenSize { amount: Expr, comment: Option<String>, }, SetPenSize { value: Expr, comment: Option<String>, }, RunRpc { service: String, rpc: String, args: Vec<(String, Expr)>, comment: Option<String>, }, RunFn { function: FnRef, args: Vec<Expr>, comment: Option<String>, }, SendLocalMessage { target: Option<Expr>, msg_type: Expr, wait: bool, comment: Option<String>, }, SendNetworkMessage { target: Expr, msg_type: String, values: Vec<(String, Expr)>, comment: Option<String>, },
}

Variants

Assign

Fields

value: Expr
comment: Option<String>

Assign the given value to each of the listed variables (afterwards, they should all be ref-eq).

AddAssign

Fields

value: Expr
comment: Option<String>

Warp

Fields

stmts: Vec<Stmt>
comment: Option<String>

InfLoop

Fields

stmts: Vec<Stmt>
comment: Option<String>

ForeachLoop

Fields

items: Expr
stmts: Vec<Stmt>
comment: Option<String>

ForLoop

Fields

start: Expr
stop: Expr
stmts: Vec<Stmt>
comment: Option<String>

UntilLoop

Fields

condition: Expr
stmts: Vec<Stmt>
comment: Option<String>

Repeat

Fields

times: Expr
stmts: Vec<Stmt>
comment: Option<String>

If

Fields

condition: Expr
then: Vec<Stmt>
comment: Option<String>

IfElse

Fields

condition: Expr
then: Vec<Stmt>
otherwise: Vec<Stmt>
comment: Option<String>

Push

Fields

list: Expr
value: Expr
comment: Option<String>

InsertAt

Fields

list: Expr
value: Expr
index: Expr
comment: Option<String>

InsertAtRand

Fields

list: Expr
value: Expr
comment: Option<String>

Pop

Fields

list: Expr
comment: Option<String>

RemoveAt

Fields

list: Expr
index: Expr
comment: Option<String>

RemoveAll

Fields

list: Expr
comment: Option<String>

IndexAssign

Fields

list: Expr
value: Expr
index: Expr
comment: Option<String>

RandIndexAssign

Fields

list: Expr
value: Expr
comment: Option<String>

LastIndexAssign

Fields

list: Expr
value: Expr
comment: Option<String>

Return

Fields

value: Expr
comment: Option<String>

Sleep

Fields

seconds: Expr
comment: Option<String>

WaitUntil

Fields

condition: Expr
comment: Option<String>

SwitchCostume

Fields

costume: Option<Expr>
comment: Option<String>

Forward

Fields

distance: Expr
comment: Option<String>

ChangePos

Fields

dx: Option<Expr>
dy: Option<Expr>
comment: Option<String>

SetPos

Fields

comment: Option<String>

Goto

Fields

target: Expr
comment: Option<String>

Similar to SetPos except that the target can be either a list of [x, y] coordinates or a entity.

TurnRight

Fields

angle: Expr
comment: Option<String>

TurnLeft

Fields

angle: Expr
comment: Option<String>

SetHeading

Fields

value: Expr
comment: Option<String>

BounceOffEdge

Fields

comment: Option<String>

PenDown

Fields

comment: Option<String>

PenUp

Fields

comment: Option<String>

PenClear

Fields

comment: Option<String>

Stamp

Fields

comment: Option<String>

Write

Fields

content: Expr
font_size: Expr
comment: Option<String>

SetPenColor

Fields

color: (u8, u8, u8)
comment: Option<String>

Say

Fields

content: Expr
duration: Option<Expr>
comment: Option<String>

Think

Fields

content: Expr
duration: Option<Expr>
comment: Option<String>

SetVisible

Fields

value: bool
comment: Option<String>

ChangeScalePercent

Fields

amount: Expr
comment: Option<String>

SetScalePercent

Fields

value: Expr
comment: Option<String>

ChangePenSize

Fields

amount: Expr
comment: Option<String>

SetPenSize

Fields

value: Expr
comment: Option<String>

RunRpc

Fields

service: String
rpc: String
args: Vec<(String, Expr)>
comment: Option<String>

RunFn

Fields

function: FnRef
args: Vec<Expr>
comment: Option<String>

SendLocalMessage

Fields

target: Option<Expr>
msg_type: Expr
wait: bool
comment: Option<String>

Sends a message to local entities (not over the network). If target is None, this should broadcast to all entities. Otherwise target is either a single target or a list of targets to send to. The wait flag determines if the broadcast should be blocking (wait for receivers to terminate).

SendNetworkMessage

Fields

target: Expr
msg_type: String
values: Vec<(String, Expr)>
comment: Option<String>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.