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

Commit a5e1b20

Browse files
committed
Move lexical_scope to all-expressions rule
1 parent 035ac6d commit a5e1b20

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

languages/super_this_method_declaration.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
class TestClass extends SecondTestClass {
22
public static void main(String[] args){
33
super.bar();
4-
// ^ defined: 12
4+
// ^ defined: 14
5+
this.bar();
6+
// ^ defined: 9
57
}
68

79
public void bar() {

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

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

305305
attr (ref) node_reference = @ident
306306

307-
node @ident.lexical_scope
308307
edge ref -> @ident.lexical_scope
309308

310309
edge @ident.type -> ref__typeof
@@ -314,7 +313,6 @@ attribute node_symbol = node => symbol = (source-text node), source_n
314313
}
315314

316315
(field_access) @field_access {
317-
node @field_access.lexical_scope
318316
node @field_access.before_scope
319317
}
320318

@@ -330,7 +328,6 @@ attribute node_symbol = node => symbol = (source-text node), source_n
330328
{
331329
node @method_invocation.before_scope
332330
node @method_invocation.after_scope
333-
node @method_invocation.lexical_scope
334331
}
335332

336333
; method calls with implicit receiver
@@ -393,15 +390,14 @@ attribute node_symbol = node => symbol = (source-text node), source_n
393390
] @expr
394391
{
395392
node @expr.type
396-
; node @expr.lexical_scope
393+
node @expr.lexical_scope
397394
}
398395

399396
[
400397
(super)
401398
(this)
402399
] @expr
403400
{
404-
node @expr.lexical_scope ; FIXME: move to the all-expressions rule
405401

406402
node expr_ref
407403
node expr_ref__typeof

0 commit comments

Comments
 (0)