Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax-bridge/src/prettify_macro_expansion.rs')
-rw-r--r--crates/syntax-bridge/src/prettify_macro_expansion.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/crates/syntax-bridge/src/prettify_macro_expansion.rs b/crates/syntax-bridge/src/prettify_macro_expansion.rs
index 017aa10b6c..ba1b4f5ae4 100644
--- a/crates/syntax-bridge/src/prettify_macro_expansion.rs
+++ b/crates/syntax-bridge/src/prettify_macro_expansion.rs
@@ -99,6 +99,10 @@ pub fn prettify_macro_expansion(
}
mods.push(do_nl(before, tok));
}
+ R_CURLY if is_next(|it| it == T![else], false) => {
+ mods.push(do_indent(before, tok, indent));
+ mods.push(do_nl(before, tok));
+ }
LIFETIME_IDENT if is_next(is_text, true) => {
mods.push(do_ws(after, tok));
}
@@ -358,6 +362,7 @@ mod tests {
} else if true {
bar()
} else {}
+ if true {} else if true {} else {}
fun()
}
};
@@ -378,6 +383,9 @@ mod tests {
}else if true {
bar()
}else {}
+ if true {
+ }else if true {
+ }else {}
fun()
}
};