File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -890,7 +890,13 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
890890 ( switch_case body: ( block stmt: { body} ) )
891891 ) ,
892892 // A single case item unwraps to its pattern, possibly boxed in conditional_pattern
893- rule!( ( switchCaseItem pattern: @p whereClause: ( whereClause condition: @cond) ) => ( conditional_pattern pattern: { p } condition: { cond} ) ) ,
893+ rule!(
894+ ( switchCaseItem
895+ pattern: @p
896+ whereClause: ( whereClause condition: @cond) )
897+ =>
898+ ( conditional_pattern pattern: { p} condition: { cond} )
899+ ) ,
894900 rule!( ( switchCaseItem pattern: @p) => pattern { p } ) ,
895901 // A pattern-matching condition (`if case let x = e`, `if case .foo(let x)
896902 // = e`) becomes a `pattern_guard_expr`: the matched pattern and the
@@ -1035,7 +1041,9 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
10351041 catch_clause: { catches} )
10361042 ) ,
10371043 rule!(
1038- ( catchItem pattern: @pattern whereClause: ( whereClause condition: @guard) )
1044+ ( catchItem
1045+ pattern: @pattern
1046+ whereClause: ( whereClause condition: @guard) )
10391047 =>
10401048 ( conditional_pattern pattern: { pattern} condition: { guard} )
10411049 ) ,
@@ -1198,7 +1206,9 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
11981206 }
11991207 ) ,
12001208 rule!(
1201- ( tupleTypeElement firstName: _? @@name type : @ty)
1209+ ( tupleTypeElement
1210+ firstName: _? @@name
1211+ type : @ty)
12021212 =>
12031213 argument {
12041214 if ctx. in_function_type {
You can’t perform that action at this time.
0 commit comments