use sway_types::{Ident, Span};
use crate::{language::ty::*, type_system::*};
pub(crate) type MatchBranchCondition = Option<TyExpression>;
pub(crate) type MatchedOrVariantIndexVars = Vec<(Ident, TyExpression)>;
#[derive(Debug)]
pub(crate) struct TyMatchExpression {
pub(crate) value_type_id: TypeId,
pub(crate) branches: Vec<TyMatchBranch>,
pub(crate) return_type_id: TypeId,
pub(crate) span: Span,
}
#[derive(Debug)]
pub(crate) struct TyMatchBranch {
pub(crate) matched_or_variant_index_vars: MatchedOrVariantIndexVars,
pub(crate) condition: MatchBranchCondition,
pub(crate) result: TyExpression,
#[allow(dead_code)]
pub(crate) span: Span,
}