Skip to content

Commit 15208b7

Browse files
committed
Unified: Add import_declaration.scoped_import_kind
1 parent 3522f35 commit 15208b7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ module.exports = grammar({
13681368
seq(
13691369
field("modifiers", optional($.modifiers)),
13701370
"import",
1371-
optional($._import_kind),
1371+
optional(field("scoped_import_kind", $._import_kind)),
13721372
field("name", $.identifier)
13731373
),
13741374
_import_kind: ($) =>

unified/extractor/tree-sitter-swift/node-types.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ named:
351351
import_declaration:
352352
modifiers?: modifiers
353353
name: identifier
354+
scoped_import_kind?: ["class", "enum", "func", "let", "protocol", "struct", "typealias", "var"]
354355
infix_expression:
355356
lhs: expression
356357
op: custom_operator

0 commit comments

Comments
 (0)