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

Commit 1188506

Browse files
committed
Scope record bodies.
1 parent be47581 commit 1188506

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,12 @@ attribute node_symbol = node => symbol = (source-text node), source_n
397397
edge @stmt.before_scope -> @method.lexical_scope
398398
}
399399

400-
(record_declaration name: (_) @name) @this {
400+
(record_declaration name: (_) @name body: (_) @body) @this {
401401
node def
402402
attr (def) node_definition = @name
403403
edge @this.defs -> def
404+
405+
edge @body.lexical_scope -> @this.lexical_scope
404406
}
405407

406408
;; ============

0 commit comments

Comments
 (0)