Skip to content

fix: extract ExpressionText from VisualBasicValue/VisualBasicReference child elements - #4

Merged
cprima merged 1 commit into
mainfrom
fix/visual-basic-element-expression-syntax
Mar 10, 2026
Merged

cprima merged 1 commit into
mainfrom
fix/visual-basic-element-expression-syntax

Conversation

@cprima

@cprima cprima commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #2

Summary

  • Add _EXPR_ELEMENT_TAGS module-level frozenset constant in extractors.py
  • _extract_business_logic_expressions: walk all descendant elements and add ExpressionText directly (raw VB.NET/C# expression, no bracket wrapping)
  • _extract_activity_arguments: traverse dotted-property child containers (e.g. InvokeMethod.Parameters) and collect ExpressionText from nested InArgument/OutArgument/InOutArgument → expression element chains
  • 4 new unit tests covering VisualBasicValue, VisualBasicReference, mixed syntax, and argument extraction

Test plan

  • uv run pytest tests/unit/test_extractors.py -q --no-cov — all pass
  • Pre-existing failures (test_profiler_overhead_disabled, test_view_query_methods) are unrelated and present on main

🤖 Generated with Claude Code

…e child elements

Closes #2

Previously, expressions encoded as child-element syntax (Syntax B) were
silently dropped. Adds descendant walking in _extract_business_logic_expressions
and dotted-property container traversal in _extract_activity_arguments so that
variable references in VisualBasicValue/VisualBasicReference/CSharpValue/CSharpReference
elements are included in call graphs, pseudocode, and variable analysis.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cprima
cprima merged commit 3522e0b into main Mar 10, 2026
0 of 6 checks passed
@cprima
cprima deleted the fix/visual-basic-element-expression-syntax branch March 10, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract expressions from VisualBasicValue/VisualBasicReference child elements (silent data loss)

1 participant