From ad5d5fc153bf03456296c0f357e59d8412931129 Mon Sep 17 00:00:00 2001 From: Rebecca Valentine Date: Tue, 18 Jul 2023 17:35:19 -0700 Subject: [PATCH] Lowers arguments nodes --- .../src/stack-graphs.tsg | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/languages/tree-sitter-stack-graphs-javascript/src/stack-graphs.tsg b/languages/tree-sitter-stack-graphs-javascript/src/stack-graphs.tsg index 611bb0959..a77629c43 100644 --- a/languages/tree-sitter-stack-graphs-javascript/src/stack-graphs.tsg +++ b/languages/tree-sitter-stack-graphs-javascript/src/stack-graphs.tsg @@ -231,8 +231,6 @@ attribute node_symbol = node => symbol = (source-text node), source_n ;; ## Nodes (_)@node { - node @node.arguments_pop - node @node.arguments_push node @node.boundvar_pop node @node.call node @node.constructor @@ -1093,8 +1091,11 @@ inherit .return_or_yield parameters:(_)@call_sig body:(_)@body)@fun_decl { + node @call_sig.arguments_pop + node @call_sig.arguments_push node @name.pop node @fun_decl.function_value + attr (@name.pop) syntax_type = "function" ; scope flows across the decl @@ -1165,8 +1166,11 @@ inherit .return_or_yield parameters:(_)@call_sig body:(_)@body)@fun_decl { + node @call_sig.arguments_pop + node @call_sig.arguments_push node @name.pop node @fun_decl.function_value + attr (@name.pop) syntax_type = "function" ; scope flows across the decl @@ -2382,6 +2386,9 @@ inherit .return_or_yield parameters:(_)@call_sig body:(_)@body)@fun { + node @call_sig.arguments_pop + node @call_sig.arguments_push + ; scope flows across the decl edge @fun.after_scope -> @fun.before_scope