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

Commit 7261ec7

Browse files
rnkaufmanrobrix
andcommitted
Simplify superclass class_declaration rule
Co-authored-by: Rob Rix <[email protected]>
1 parent 9f5de81 commit 7261ec7

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

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

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ attribute node_symbol = node => symbol = (source-text node), source_n
125125

126126
(class_declaration
127127
superclass: (superclass
128-
(type_identifier) @superclass_name)
128+
(_) @superclass_name)
129129
body: (class_body) @class_body) @class {
130130

131131
node ref
@@ -150,14 +150,6 @@ attribute node_symbol = node => symbol = (source-text node), source_n
150150
edge @class.type -> ref
151151
}
152152

153-
(class_declaration
154-
superclass: (superclass
155-
(generic_type
156-
(type_identifier)) @superclass_name)) @class {
157-
edge @superclass_name.lexical_scope -> @class.lexical_scope
158-
}
159-
160-
161153
(class_declaration (type_parameters)) @class {
162154
node @class.type_parameters
163155
edge @class.lexical_scope -> @class.type_parameters

0 commit comments

Comments
 (0)