Skip to content

Commit

Permalink
fix: lookup variables in array element initializers
Browse files Browse the repository at this point in the history
  • Loading branch information
didroe committed Sep 25, 2023
1 parent 5326583 commit 281679a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion internal/languages/php/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 281679a

Please sign in to comment.