@@ -210,9 +210,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
210210 // referenced identifier / operator symbol.
211211 rule!( ( declReferenceExpr baseName: @name) => ( identifier #{ name} ) ) ,
212212 // A discard `_` used as an expression — e.g. the target of a discarding
213- // assignment `_ = x`. swift-syntax models it as a `discardAssignmentExpr`;
214- // the target AST represents it as a `name_node` over the `_` token.
215- rule!( ( discardAssignmentExpr wildcard: @@w) => ( identifier #{ w} ) ) ,
213+ // assignment `_ = x`. swift-syntax models it as a `discardAssignmentExpr`.
214+ rule!( ( discardAssignmentExpr wildcard: @@w) => ( ignore_pattern #{ w} ) ) ,
216215 // A generic specialization in expression position (`C<Foo>`,
217216 // `Array<Int>`) is represented by swift-syntax as a
218217 // `genericSpecializationExpr`. When used as a call target
@@ -547,7 +546,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
547546 // A wildcard *binding* pattern (`let _ = x`, `for _ in xs`). swift-syntax
548547 // models this as a `wildcardPattern`, distinct from the `_` match form
549548 // handled by the context-aware `discardAssignmentExpr` rule.
550- rule!( ( wildcardPattern) @@wildcard => ( identifier #{ wildcard} ) ) ,
549+ rule!( ( wildcardPattern) @@wildcard => ( ignore_pattern #{ wildcard} ) ) ,
551550 // An expression pattern only establishes pattern context; its child
552551 // determines the concrete pattern shape.
553552 rule!( ( expressionPattern expression: @@e) => expr {
0 commit comments