Skip to content

feat(vba): extract Enum and Const declarations - #14

Merged
ardelperal merged 1 commit into
mainfrom
feat/vba-enums-consts
Jun 30, 2026
Merged

feat(vba): extract Enum and Const declarations#14
ardelperal merged 1 commit into
mainfrom
feat/vba-enums-consts

Conversation

@ardelperal

Copy link
Copy Markdown
Owner

Slice 1 of 2 closing high-value VBA-for-Access extraction gaps found by reviewing CodeGraph against the Dysflow export pipeline.

What

Dysflow exports the full module text into .bas/.cls, so a real constants module (constantes.bas) carries Public Enum ... End Enum blocks and Public Const lines verbatim. The extractor parsed neither — status enums and config constants were invisible in the graph.

Changes

  • New sweepEnumsAndConsts pass in VbaExtractor: enum node + one enum_member per member (contains enum->member); constant node per declared name (multi-name lines included); contains module/class->enum and ->constant; visibility folds like procedures; enum_member.qualifiedName enum-scoped (EnumName.Member).
  • Spec: REQ-CODE-10 narrowed to Option-only files; added REQ-CODE-12 (Enum) and REQ-CODE-13 (Const).
  • Flipped the constantes.bas real-fixtures assertion.

Tests (strict TDD)

New extraction-vba-enums-consts.test.ts (14 cases), red then green. No regressions (the only failures, frameworks-integration JVM + mcp-roots EPERM, are pre-existing Windows-flaky, confirmed on baseline). tsc clean.

Dysflow exports the full module text, so a constants module carries its
Enum...End Enum blocks and Const lines verbatim. The extractor parsed
neither, leaving the project's domain dictionary (status enums, config
constants) invisible in the graph.

Add a sweepEnumsAndConsts pass to VbaExtractor:
- enum node + one enum_member per member, contains edge enum->member
- constant node per declared name (multi-name lines included)
- contains edge module/class->enum and ->constant
- visibility folds like procedures (Private->private, else public)
- enum_member qualifiedName is enum-scoped (EnumName.Member)

REQ-CODE-10 narrowed to Option-directives-only files; a file with
Enum/Const but no procedures now emits a module/class node. Updates the
real-fixtures assertion for constantes.bas accordingly and adds
REQ-CODE-12/13 to the spec.
@ardelperal
ardelperal merged commit 8d78785 into main Jun 30, 2026
2 of 6 checks passed
@ardelperal
ardelperal deleted the feat/vba-enums-consts branch June 30, 2026 07:32
ardelperal added a commit that referenced this pull request Jul 3, 2026
- vba-graph-connectivity-fixes (PR #14, 9b1787a; affected issues #12, #13)
- vba-api-declarations (PR #31, 9b614b7; issue #15)
- 2026-06-30-vba-event-tracer (PR #36, 393b14d)
- 2026-06-30-vba-sql-impact (PR #38, ba25ef4)

The artifact folders had been left in openspec/changes/ after their PRs landed on main; an openspec list now reports them as still-active, which masks the true state of the SDD pipeline. Move to archive/ alongside the other finished changes and update [Unreleased] to record the hygiene. Pure docs/text move, zero product-code impact.
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.

1 participant