cl-ast: Change loop expression to take any expression as its argument, for later desugaring.

This commit is contained in:
2024-04-18 01:53:32 -05:00
parent 00d72b823a
commit 02b775259e
3 changed files with 6 additions and 8 deletions

View File

@@ -666,6 +666,7 @@ mod convert {
Block => ExprKind::Block,
Group => ExprKind::Group,
Tuple => ExprKind::Tuple,
Loop => ExprKind::Loop,
While => ExprKind::While,
If => ExprKind::If,
For => ExprKind::For,

View File

@@ -497,7 +497,7 @@ pub struct Tuple {
/// A [Loop] expression: `loop` [`Block`]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct Loop {
pub body: Block,
pub body: Box<Expr>,
}
/// A [While] expression: `while` [`Expr`] [`Block`] [`Else`]?