Rework attribute recovery logic
This commit is contained in:
parent
01e2cf8f44
commit
0b0e826c0f
16 changed files with 116 additions and 64 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue