use crate::ast::prelude::*;
#[test]
#[cfg(not(miri))]
fn ast_parse() {
rt::<ast::ExprLoop>("loop {}");
rt::<ast::ExprLoop>("loop { 1; }");
rt::<ast::ExprLoop>("'label: loop {1;}");
rt::<ast::ExprLoop>("#[attr] 'label: loop {x();}");
}
#[derive(Debug, TryClone, PartialEq, Eq, Parse, ToTokens, Spanned)]
#[rune(parse = "meta_only")]
#[non_exhaustive]
pub struct ExprLoop {
#[rune(iter, meta)]
pub attributes: Vec<ast::Attribute>,
#[rune(iter, meta)]
pub label: Option<(ast::Label, T![:])>,
pub loop_token: T![loop],
pub body: Box<ast::Block>,
}
expr_parse!(Loop, ExprLoop, "loop expression");