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

Commit 1aba4c7

Browse files
committed
Blocks can appear in class bodies.
1 parent f1b50d2 commit 1aba4c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,12 @@ attribute node_symbol = node => symbol = (source-text node), source_n
185185
edge @declaration.lexical_scope -> @class_body.lexical_scope
186186
}
187187

188+
(class_body (block) @block) {
189+
node @block.defs
190+
node @block.lexical_scope
191+
edge @block.lexical_scope -> @block.before_scope
192+
}
193+
188194
;; =====================
189195
;; Member Declarations
190196
;; =====================

0 commit comments

Comments
 (0)