Skip to content

Commit ea8be8c

Browse files
committed
unified: drop element field on _parenthesized_type
Same pattern we've seen many times before: a field on an anonymous node gets attached to the parent node instead. I'm not 100% sure this is the right solution, but it seemed wrong to just make `_parenthesized_type` named instead (we don't usually name parentheticals). At the very least, this cleans up the spurious navigation_expression.element and tuple_type_item.element fields.
1 parent 336da15 commit ea8be8c

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

unified/extractor/tree-sitter-swift/grammar.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -567,10 +567,7 @@ module.exports = grammar({
567567
_parenthesized_type: ($) =>
568568
seq(
569569
"(",
570-
field(
571-
"element",
572-
choice($.opaque_type, $.existential_type, $.dictionary_type)
573-
),
570+
choice($.opaque_type, $.existential_type, $.dictionary_type),
574571
")"
575572
),
576573
navigation_expression: ($) =>

0 commit comments

Comments
 (0)