Skip to content

Commit 74fdfb8

Browse files
hvitvedCopilot
andcommitted
unified: Extract Swift super expressions
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent d4ade71 commit 74fdfb8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • unified/extractor/src/languages/swift

‎unified/extractor/src/languages/swift/swift.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,8 +1044,9 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
10441044
// becomes a `modifier`; its source text is the modifier spelling.
10451045
rule!((attribute) @m => (modifier #{m})),
10461046
rule!((declModifier) @m => (modifier #{m})),
1047-
// A `super` expression.
1048-
rule!((superExpr) => (super_expr)),
1047+
// Preserve the `super` keyword as a dedicated expression, normally used
1048+
// as the base of a member access (`super.foo`).
1049+
rule!((superExpr superKeyword: @keyword) => (super_expr #{keyword})),
10491050
// Type expressions. A generic type applied with explicit arguments
10501051
// (`Set<Int>`) becomes a `generic_type_expr` whose `base` is the type
10511052
// name and whose `type_argument`s are the (structured) arguments — the

0 commit comments

Comments
 (0)