1use crate::{
2 enumeration::Enum, expression::Expression, function::Function, structure::Struct, r#type::Type,
3};
4
5#[derive(Debug, Clone, PartialEq)]
6pub enum Statement {
7 FunctionDecl(Function),
8 StructDecl(Struct),
9 EnumDecl(Enum),
10 VariableDecl {
11 name: String,
12 ty: Type,
13 source_type: Option<String>,
14 value: Expression,
15 },
16 Assignment {
17 target: Expression,
18 value: Expression,
19 },
20 Conditional {
21 condition: Expression,
22 then_block: Vec<Self>,
23 else_block: Vec<Self>,
24 },
25 Return(Option<Expression>),
26 Expr(Expression),
27 ForIn {
29 var: String,
30 iter: Expression,
31 body: Vec<Self>,
32 ipairs: bool,
34 },
35 ForNumeric {
37 var: String,
38 start: Expression,
39 limit: Expression,
40 body: Vec<Self>,
41 },
42 While {
45 condition: Expression,
46 body: Vec<Self>,
47 },
48 Continue,
51 Break,
53}