@@ -206,9 +206,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
206206 // referenced identifier / operator symbol.
207207 rule!( ( declReferenceExpr baseName: @name) => ( identifier #{ name} ) ) ,
208208 // A discard `_` used as an expression — e.g. the target of a discarding
209- // assignment `_ = x`. swift-syntax models it as a `discardAssignmentExpr`;
210- // the target AST represents it as a `name_node` over the `_` token.
211- rule!( ( discardAssignmentExpr wildcard: @@w) => ( identifier #{ w} ) ) ,
209+ // assignment `_ = x`. swift-syntax models it as a `discardAssignmentExpr`.
210+ rule!( ( discardAssignmentExpr wildcard: @@w) => ( ignore_pattern #{ w} ) ) ,
212211 // A generic specialization in expression position (`C<Foo>`,
213212 // `Array<Int>`) is represented by swift-syntax as a
214213 // `genericSpecializationExpr`. When used as a call target
@@ -560,7 +559,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
560559 // A wildcard *binding* pattern (`let _ = x`, `for _ in xs`). swift-syntax
561560 // models this as a `wildcardPattern`, distinct from the `_` match form
562561 // handled by the context-aware `discardAssignmentExpr` rule.
563- rule!( ( wildcardPattern) @@wildcard => ( identifier #{ wildcard} ) ) ,
562+ rule!( ( wildcardPattern) @@wildcard => ( ignore_pattern #{ wildcard} ) ) ,
564563 // An expression pattern only establishes pattern context; its child
565564 // determines the concrete pattern shape.
566565 rule!( ( expressionPattern expression: @@e) => expr {
0 commit comments