From 281679af04c5ac757c6ede5cfb6ea5e6417fa372 Mon Sep 17 00:00:00 2001 From: David Roe Date: Mon, 25 Sep 2023 13:29:32 +0100 Subject: [PATCH] fix: lookup variables in array element initializers --- internal/languages/php/analyzer/analyzer.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/languages/php/analyzer/analyzer.go b/internal/languages/php/analyzer/analyzer.go index 13eeb2e68..2beb9f41a 100644 --- a/internal/languages/php/analyzer/analyzer.go +++ b/internal/languages/php/analyzer/analyzer.go @@ -50,7 +50,12 @@ func (analyzer *analyzer) Analyze(node *sitter.Node, visitChildren func() error) return analyzer.analyzeGenericConstruct(node, visitChildren) case "switch_label": return visitChildren() - case "binary_expression", "unary_op_expression", "argument", "encapsed_string", "sequence_expression": + case "binary_expression", + "unary_op_expression", + "argument", + "encapsed_string", + "sequence_expression", + "array_element_initializer": return analyzer.analyzeGenericOperation(node, visitChildren) case "while_statement", "do_statement", "if_statement", "expression_statement", "compound_statement": // statements don't have results return visitChildren()