pub enum Stat {
LocalAssign {
names: Vec<String>,
exprs: Vec<Expr>,
},
Assign {
targets: Vec<Expr>,
values: Vec<Expr>,
},
Call(CallExpr),
DoBlock(Block),
While {
cond: Expr,
body: Block,
},
Repeat {
body: Block,
cond: Expr,
},
If {
cond: Expr,
then_block: Block,
elseif_clauses: Vec<(Expr, Block)>,
else_block: Option<Block>,
},
NumericFor {
name: String,
start: Expr,
limit: Expr,
step: Option<Expr>,
body: Block,
},
GenericFor {
names: Vec<String>,
iterators: Vec<Expr>,
body: Block,
},
Return(Vec<Expr>),
Break,
Comment(String),
}Expand description
Lua statement.
Variants§
LocalAssign
local var1, var2 = expr1, expr2
Assign
var1, var2 = expr1, expr2
Call(CallExpr)
expr(args) (function call as statement)
DoBlock(Block)
do ... end
While
while cond do ... end
Repeat
repeat ... until cond
If
if cond then ... elseif ... else ... end
NumericFor
for name = start, limit, step do ... end
GenericFor
for name1, name2 in iter do ... end
Return(Vec<Expr>)
return expr1, expr2, ...
Break
break
Comment(String)
Comment (for readability of decompiled output).
Trait Implementations§
impl StructuralPartialEq for Stat
Auto Trait Implementations§
impl Freeze for Stat
impl RefUnwindSafe for Stat
impl Send for Stat
impl Sync for Stat
impl Unpin for Stat
impl UnsafeUnpin for Stat
impl UnwindSafe for Stat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more