File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -555,9 +555,22 @@ impl ToRichIr for Match {
555555}
556556impl ToRichIr for MatchCase {
557557 fn build_rich_ir ( & self , builder : & mut RichIrBuilder ) {
558+ builder. push ( "case " , None , EnumSet :: empty ( ) ) ;
558559 self . pattern . build_rich_ir ( builder) ;
560+ if let Some ( box condition) = & self . condition {
561+ builder. push ( ", " , None , EnumSet :: empty ( ) ) ;
562+ builder. indent ( ) ;
563+ builder. push_newline ( ) ;
564+ builder. push ( "condition " , None , EnumSet :: empty ( ) ) ;
565+ condition. build_rich_ir ( builder) ;
566+ }
559567 builder. push ( " -> " , None , EnumSet :: empty ( ) ) ;
568+ builder. indent ( ) ;
560569 builder. push_foldable ( |builder| builder. push_children_multiline ( & self . body ) ) ;
570+ if self . condition . is_some ( ) {
571+ builder. dedent ( ) ;
572+ }
573+ builder. dedent ( ) ;
561574 }
562575}
563576impl ToRichIr for OrPattern {
You can’t perform that action at this time.
0 commit comments