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

Commit 26c04d0

Browse files
rnkaufmanrobrix
andcommitted
Stop sharing ROOT_NODE between file imports
The root node allowed us to share the definition ubiquitously across multiple files, which erroneously allowed imports definitions to be reached across files. Co-authored-by: Rob Rix <[email protected]>
1 parent ac2a19a commit 26c04d0

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,21 +34,12 @@ attribute node_symbol = node => symbol = (source-text node), source_n
3434
; # # # #### #### # # # # # # ####
3535
;
3636
; ########################################################
37-
(program)@prog {
38-
scan FILE_PATH {
39-
"([^/]+)\.java$" {
40-
; FIXME add definitions
41-
42-
}
43-
}
44-
45-
}
4637

4738
(program)@prog {
4839
node @prog.defs
4940
node @prog.lexical_scope
5041
edge @prog.lexical_scope -> ROOT_NODE
51-
edge ROOT_NODE -> @prog.defs
42+
edge @prog.lexical_scope -> @prog.defs
5243
}
5344

5445
(program (_)@declaration)@prog {

0 commit comments

Comments
 (0)