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

Commit 40dfe0e

Browse files
committed
Scope explicit constructor invocations.
1 parent 44575d6 commit 40dfe0e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,18 @@ attribute node_symbol = node => symbol = (source-text node), source_n
235235
node @this.after_scope
236236
}
237237

238+
(explicit_constructor_invocation constructor: (_) @constructor) @this {
239+
edge @constructor.lexical_scope -> @this.lexical_scope
240+
}
241+
242+
(explicit_constructor_invocation object: (_) @object) @this {
243+
edge @object.lexical_scope -> @this.lexical_scope
244+
}
245+
246+
(explicit_constructor_invocation arguments: (argument_list (_) @arg)) @this {
247+
edge @arg.lexical_scope -> @this.lexical_scope
248+
}
249+
238250
(enum_declaration name: (_) @name) @this {
239251
node def
240252
attr (def) node_definition = @name

0 commit comments

Comments
 (0)