Skip to content

Commit

Permalink
fmt fix
Browse files Browse the repository at this point in the history
Signed-off-by: Shashank Mittal <[email protected]>
  • Loading branch information
shashank-iitbhu committed Feb 16, 2024
1 parent 17ebee6 commit 3d92cee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions kclvm/ast_pretty/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ impl<'p, 'ctx> MutSelfTypedResultWalker<'ctx> for Printer<'p> {
self.stmts(&if_stmt.body);
self.write_indentation(Indentation::Dedent);
if !if_stmt.orelse.is_empty() {
for (_, sub_stmt) in if_stmt.orelse.iter().enumerate(){
if let ast::Stmt::If(elif_stmt)= &sub_stmt.node{
for sub_stmt in if_stmt.orelse.iter() {
if let ast::Stmt::If(elif_stmt) = &sub_stmt.node {
// Nested if statements need to be considered,
// so `el` needs to be preceded by the current indentation.
self.fill("el");
self.walk_if_stmt(elif_stmt);
} else {
Expand Down

0 comments on commit 3d92cee

Please sign in to comment.