AST - Fixed loop label dump

This commit is contained in:
Emmanuel BENOîT 2023-01-02 11:25:18 +01:00
parent c5c8b04355
commit 14d5b94f76

View file

@ -130,16 +130,12 @@ impl AstDumper for StmtNode {
condition, condition,
body, body,
} => { } => {
format!( let ltxt = if let Some(label) = label {
"( {}while {} {} )", format!("@{} ", label.lexeme)
if let Some(label) = label {
&format!("@{} ", label.lexeme)
} else { } else {
"" "".to_string()
}, };
condition.dump(), format!("( {}while {} {} )", ltxt, condition.dump(), body.dump())
body.dump()
)
} }
Self::LoopControlStmt { Self::LoopControlStmt {