pub enum SimpletonStatement {
CreateVariable {
name: String,
value: SimpletonExpressionStart,
},
AssignValue {
object: SimpletonExpressionStart,
value: SimpletonExpressionStart,
},
Expression(SimpletonExpressionStart),
Return(SimpletonExpressionStart),
IfElse {
condition: SimpletonExpressionStart,
success: Vec<SimpletonStatement>,
failure: Option<Vec<SimpletonStatement>>,
},
While {
condition: SimpletonExpressionStart,
statements: Vec<SimpletonStatement>,
},
For {
variable: String,
iterator: SimpletonExpressionStart,
statements: Vec<SimpletonStatement>,
},
}
Variants§
CreateVariable
AssignValue
Expression(SimpletonExpressionStart)
Return(SimpletonExpressionStart)
IfElse
Fields
§
condition: SimpletonExpressionStart
§
success: Vec<SimpletonStatement>
§
failure: Option<Vec<SimpletonStatement>>
While
For
Implementations§
Source§impl SimpletonStatement
impl SimpletonStatement
pub fn recursive_any(&self, f: &impl Fn(&Self) -> bool) -> bool
pub fn compile( &self, result: &mut Vec<ScriptOperation<'_, SimpletonScriptExpression>>, registers: &mut Vec<String>, closures: &mut Vec<SimpletonFunction>, closures_index: &mut usize, subscope_level: usize, )
Trait Implementations§
Source§impl Clone for SimpletonStatement
impl Clone for SimpletonStatement
Source§fn clone(&self) -> SimpletonStatement
fn clone(&self) -> SimpletonStatement
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SimpletonStatement
impl Debug for SimpletonStatement
Source§impl<'de> Deserialize<'de> for SimpletonStatement
impl<'de> Deserialize<'de> for SimpletonStatement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SimpletonStatement
impl RefUnwindSafe for SimpletonStatement
impl Send for SimpletonStatement
impl Sync for SimpletonStatement
impl Unpin for SimpletonStatement
impl UnwindSafe for SimpletonStatement
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