Skip to content

Extract variables from more structures

Kevin Daudt requested to merge parser-support-variables-in-more-structures into master

The parser looks for variables (assignments) only directly in statements in the root of the AST. This means variables that are set in things like if-statements, case-statements and others are hidden.

Address this by extending the parser to traverse relevant AST nodes and extract variables from the statements in those. As these AST nodes contains statements, the parser works inherently recursively, so we don't have to do anything special to go arbitrary deep.

Merge request reports