Skip to content
Snippets Groups Projects

Fork reshape

Merged Aaron Councilman requested to merge fork-reshape into main
4 files
+ 95
8
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -488,6 +488,29 @@ fn compile_expr(
@@ -488,6 +488,29 @@ fn compile_expr(
rhs: Box::new(rhs),
rhs: Box::new(rhs),
}))
}))
}
}
 
parser::Expr::Tuple {
 
span: _,
 
exps,
 
} => {
 
let exprs = exps.into_iter()
 
.map(|e| compile_exp_as_expr(e, lexer, macrostab, macros))
 
.fold(Ok(vec![]),
 
|mut res, exp| {
 
let mut res = res?;
 
res.push(exp?);
 
Ok(res)
 
})?;
 
Ok(ExprResult::Expr(ir::ScheduleExp::Tuple { exprs }))
 
}
 
parser::Expr::TupleField {
 
span: _,
 
lhs,
 
field,
 
} => {
 
let lhs = compile_exp_as_expr(*lhs, lexer, macrostab, macros)?;
 
let field = lexer.span_str(field).parse().expect("Parsing");
 
Ok(ExprResult::Expr(ir::ScheduleExp::TupleField { lhs: Box::new(lhs), field }))
 
}
}
}
}
}
Loading