Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 4d240c0

Browse files
committed
Declare interfaces.
1 parent cd8d839 commit 4d240c0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

languages/tree-sitter-stack-graphs-java/src/stack-graphs.tsg

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,25 @@ attribute node_symbol = node => symbol = (source-text node), source_n
269269
edge @modifiers.lexical_scope -> @decl.lexical_scope
270270
}
271271

272+
(interface_declaration name: (_) @name body: (_) @body) @this {
273+
node def
274+
attr (def) node_definition = @name
275+
edge @this.defs -> def
276+
277+
edge def -> @body.defs
278+
edge @body.lexical_scope -> @this.lexical_scope
279+
}
280+
281+
(interface_body) @this {
282+
node @this.defs
283+
node @this.lexical_scope
284+
}
285+
286+
(interface_body (_) @child) @this {
287+
edge @this.defs -> @child.defs
288+
edge @child.lexical_scope -> @this.lexical_scope
289+
}
290+
272291
(method_declaration
273292
type: (_) @type
274293
name: (identifier) @name

0 commit comments

Comments
 (0)