Add base branch logic
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
use crate::syn::Spanned;
|
||||
|
||||
pub type SpBody = Spanned<Body>;
|
||||
pub type Body = Vec<SpStmt>;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum Stmt {
|
||||
Assign(SpAssignLhs, SpExpr),
|
||||
Expr(SpExpr),
|
||||
If {
|
||||
if_true: SpCondExpr,
|
||||
elseif: Vec<SpCondExpr>,
|
||||
else_expr: Option<SpExpr>,
|
||||
if_true: SpCondBody,
|
||||
elseif: Vec<SpCondBody>,
|
||||
else_body: Option<SpBody>,
|
||||
},
|
||||
Def {
|
||||
name: String,
|
||||
@@ -38,12 +41,12 @@ pub enum AssignLhs {
|
||||
pub type SpStmt = Spanned<Stmt>;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct CondExpr {
|
||||
pub struct CondBody {
|
||||
pub cond: SpExpr,
|
||||
pub expr: SpExpr,
|
||||
pub body: SpBody,
|
||||
}
|
||||
|
||||
pub type SpCondExpr = Spanned<CondExpr>;
|
||||
pub type SpCondBody = Spanned<CondBody>;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Param {
|
||||
|
||||
Reference in New Issue
Block a user