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

Commit 8b6d462

Browse files
committed
super nodes are references.
1 parent bff3acd commit 8b6d462

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,26 @@ attribute node_symbol = node => symbol = (source-text node), source_n
347347
; node @expr.lexical_scope
348348
}
349349

350+
(super) @super
351+
{
352+
node @super.lexical_scope ; FIXME: move to the all-expressions rule
353+
354+
node expr_ref
355+
node expr_ref__ns
356+
node expr_ref__typeof
357+
358+
attr (expr_ref) node_reference = @super
359+
edge expr_ref -> expr_ref__ns
360+
361+
attr (expr_ref__ns) push_symbol = "%E"
362+
edge expr_ref__ns -> @super.lexical_scope
363+
364+
edge @super.type -> expr_ref__typeof
365+
366+
attr (expr_ref__typeof) push_symbol = ":"
367+
edge expr_ref__typeof -> expr_ref
368+
}
369+
350370
(method_invocation
351371
object: (super)
352372
name: (identifier) @method_name) @method_invocation {

0 commit comments

Comments
 (0)