@@ -1213,6 +1213,18 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
12131213 rule!( ( awaitExpr awaitKeyword: @@keyword expression: @val) => ( unary_expr
12141214 operator: ( prefix_operator "await" location: { keyword} )
12151215 operand: { val} ) ) ,
1216+ rule!( ( borrowExpr borrowKeyword: @@keyword expression: @val) => ( unary_expr
1217+ operator: ( prefix_operator #{ keyword} )
1218+ operand: { val} ) ) ,
1219+ rule!( ( consumeExpr consumeKeyword: @@keyword expression: @val) => ( unary_expr
1220+ operator: ( prefix_operator #{ keyword} )
1221+ operand: { val} ) ) ,
1222+ rule!( ( copyExpr copyKeyword: @@keyword expression: @val) => ( unary_expr
1223+ operator: ( prefix_operator #{ keyword} )
1224+ operand: { val} ) ) ,
1225+ rule!( ( unsafeExpr unsafeKeyword: @@keyword expression: @val) => ( unary_expr
1226+ operator: ( prefix_operator #{ keyword} )
1227+ operand: { val} ) ) ,
12161228 // Force-unwrap (`x!`) → postfix unary_expr, via swift-syntax's dedicated
12171229 // `forceUnwrapExpr` node.
12181230 rule!( ( forceUnwrapExpr expression: @e exclamationMark: @@mark) => ( unary_expr
@@ -1613,11 +1625,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
16131625 // these roots is discarded with its parent and needs no separate rule.
16141626 // Explicit empty content preserves their existing representation
16151627 // instead of inheriting the matched source text.
1616- rule!( ( borrowExpr) => ( unsupported_node "" ) ) ,
16171628 rule!( ( classRestrictionType) => ( unsupported_node "" ) ) ,
16181629 rule!( ( compositionType) => ( unsupported_node "" ) ) ,
1619- rule!( ( consumeExpr) => ( unsupported_node "" ) ) ,
1620- rule!( ( copyExpr) => ( unsupported_node "" ) ) ,
16211630 rule!( ( discardStmt) => ( unsupported_node "" ) ) ,
16221631 rule!( ( fallThroughStmt) => ( unsupported_node "" ) ) ,
16231632 rule!( ( implicitlyUnwrappedOptionalType) => ( unsupported_node "" ) ) ,
@@ -1637,7 +1646,6 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
16371646 rule!( ( subscriptDecl) => ( unsupported_node "" ) ) ,
16381647 rule!( ( suppressedType) => ( unsupported_node "" ) ) ,
16391648 rule!( ( typeExpr) => ( unsupported_node "" ) ) ,
1640- rule!( ( unsafeExpr) => ( unsupported_node "" ) ) ,
16411649 rule!( ( yieldStmt) => ( unsupported_node "" ) ) ,
16421650 // Anything reaching this final generic handler has neither a
16431651 // dedicated rule nor an explicit unsupported entry.
0 commit comments