diff options
Diffstat (limited to 'Shell/Formatter.cpp')
-rw-r--r-- | Shell/Formatter.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Shell/Formatter.cpp b/Shell/Formatter.cpp index 35a162afd6..05975c4aca 100644 --- a/Shell/Formatter.cpp +++ b/Shell/Formatter.cpp @@ -452,6 +452,17 @@ void Formatter::visit(const AST::MatchExpr* node) } current_builder().append(' '); + if (entry.match_names.has_value() && !entry.match_names.value().is_empty()) { + current_builder().append("as ("); + auto first = true; + for (auto& name : entry.match_names.value()) { + if (!first) + current_builder().append(' '); + first = false; + current_builder().append(name); + } + current_builder().append(") "); + } in_new_block([&] { if (entry.body) entry.body->visit(*this); |