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

Commit b8b8f70

Browse files
committed
Add a node for the type of the implicit receiver.
1 parent 95f0acd commit b8b8f70

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,10 @@ attribute node_symbol = node => symbol = (source-text node), source_n
319319
node implicit_this
320320
node implicit_this__typeof
321321

322+
node object__typeof
323+
322324
; attr (implicit_this) node_reference = @method_invocation
323-
attr (implicit_this) push_symbol = "this", empty_source_span
325+
attr (implicit_this) symbol_reference = "this", empty_source_span
324326

325327
; receiver is implicitly "this"
326328
edge implicit_this__typeof -> implicit_this
@@ -333,7 +335,8 @@ attribute node_symbol = node => symbol = (source-text node), source_n
333335

334336
attr (member) push_symbol = "."
335337

336-
edge member -> implicit_this__typeof
338+
edge member -> object__typeof
339+
edge object__typeof -> implicit_this__typeof
337340

338341
node expr_ref__typeof
339342
edge @method_invocation.type -> expr_ref__typeof

0 commit comments

Comments
 (0)