Improved match item span
This commit is contained in:
@@ -35,7 +35,7 @@ pub enum Statement {
|
||||
iterator: Expression,
|
||||
body: StatementBody,
|
||||
},
|
||||
Match(Expression, Vec<(Vec<Pattern>, Expression)>),
|
||||
Match(Expression, Vec<Spanned<MatchItem>>),
|
||||
|
||||
VarDecl(VarDeclStmt),
|
||||
Return(Option<Expression>),
|
||||
@@ -43,6 +43,9 @@ pub enum Statement {
|
||||
Continue,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct MatchItem(pub Vec<Pattern>, pub Expression);
|
||||
|
||||
#[derive(Debug, Clone, Serialize)]
|
||||
pub struct VarDecl {
|
||||
pub name: Pattern,
|
||||
|
||||
Reference in New Issue
Block a user