diff --git a/unified/extractor/tree-sitter-swift/grammar.js b/unified/extractor/tree-sitter-swift/grammar.js index 51a680e05a1..4d20431a070 100644 --- a/unified/extractor/tree-sitter-swift/grammar.js +++ b/unified/extractor/tree-sitter-swift/grammar.js @@ -567,10 +567,7 @@ module.exports = grammar({ _parenthesized_type: ($) => seq( "(", - field( - "element", - choice($.opaque_type, $.existential_type, $.dictionary_type) - ), + choice($.opaque_type, $.existential_type, $.dictionary_type), ")" ), navigation_expression: ($) => diff --git a/unified/extractor/tree-sitter-swift/node-types.yml b/unified/extractor/tree-sitter-swift/node-types.yml index 5c4098db84f..7ac626492d4 100644 --- a/unified/extractor/tree-sitter-swift/node-types.yml +++ b/unified/extractor/tree-sitter-swift/node-types.yml @@ -314,7 +314,6 @@ named: rhs: expression mutation_modifier: navigation_expression: - element?: [dictionary_type, existential_type, opaque_type] suffix: navigation_suffix target+: ["(", ")", array_type, dictionary_type, existential_type, expression, opaque_type, user_type] navigation_suffix: @@ -459,8 +458,7 @@ named: $children?: tuple_type_item element*: tuple_type_item tuple_type_item: - $children*: [parameter_modifiers, wildcard_pattern] - element?: [dictionary_type, existential_type, opaque_type] + $children*: [dictionary_type, existential_type, opaque_type, parameter_modifiers, wildcard_pattern] name?: simple_identifier type?: type type: