Rework attribute recovery logic

This commit is contained in:
Esteban Küber 2025-09-28 20:52:57 +00:00
parent 01e2cf8f44
commit 0b0e826c0f
16 changed files with 116 additions and 64 deletions

View file

@ -1259,6 +1259,19 @@ pub enum StmtKind {
MacCall(Box<MacCallStmt>),
}
impl StmtKind {
pub fn descr(&self) -> &'static str {
match self {
StmtKind::Let(_) => "local",
StmtKind::Item(_) => "item",
StmtKind::Expr(_) => "expression",
StmtKind::Semi(_) => "statement",
StmtKind::Empty => "semicolon",
StmtKind::MacCall(_) => "macro",
}
}
}
#[derive(Clone, Encodable, Decodable, Debug, Walkable)]
pub struct MacCallStmt {
pub mac: Box<MacCall>,