ast: add continue expression
This commit is contained in:
@@ -354,6 +354,7 @@ impl<A: Annotation> Display for Expr<A> {
|
||||
Self::Bind(v) => v.fmt(f),
|
||||
Self::Make(v) => v.fmt(f),
|
||||
|
||||
Self::Op(op @ Op::Continue, exprs) => f.delimit(op, "").list(exprs, "!?,"),
|
||||
Self::Op(op @ (Op::If | Op::While), exprs) => match exprs.as_slice() {
|
||||
[cond, pass, Anno(Expr::Op(Op::Tuple, e), _)] if e.is_empty() => {
|
||||
write!(f, "{op}{cond} {pass}")
|
||||
|
||||
Reference in New Issue
Block a user