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

Commit 397b19f

Browse files
committed
Blocks are not expressions.
1 parent c76bd63 commit 397b19f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,13 +977,20 @@ attribute node_symbol = node => symbol = (source-text node), source_n
977977
edge @type.lexical_scope -> @this.lexical_scope
978978
}
979979

980-
(lambda_expression body: (_) @body) @this {
980+
(lambda_expression) @this {
981981
node @this.params
982+
}
982983

984+
(lambda_expression body: (expression) @body) @this {
983985
edge @body.lexical_scope -> @this.lexical_scope
984986
edge @body.lexical_scope -> @this.params
985987
}
986988

989+
(lambda_expression body: (block) @body) @this {
990+
edge @body.before_scope -> @this.lexical_scope
991+
edge @body.before_scope -> @this.params
992+
}
993+
987994
(lambda_expression parameters: (_) @param) @this {
988995
node param
989996
attr (param) node_definition = @param

0 commit comments

Comments
 (0)