T3: Populate named_groups in Match results #40

Open
opened 2026-03-24 22:26:33 +03:00 by NiXTheDev · 0 comments
NiXTheDev commented 2026-03-24 22:26:33 +03:00 (Migrated from github.com)

Task 3: Populate Named Groups

Wave: 1 (Critical Bug Fixes)
Category: unspecified-high
Parent: Epic #37

Problem

Match.named_groups HashMap is always empty. Named groups are tracked in NFA but never propagated to Match results.

What to do

  • RED: Write failing tests asserting Match.named_groups is populated
  • GREEN: Update engine to track named groups during NFA simulation and populate Match.named_groups
  • REFACTOR: Clean up group tracking code

Acceptance Criteria

  • Match.named_groups contains entries for all named capture groups
  • Named group names are correct strings
  • Named group spans (start, end) are correct

Files

  • ogex/src/engine.rs:270-280 — Match construction (named_groups always empty)
  • ogex/tests/compatibility_tests.rs:147 — TODO comment about named groups

Commit

fix: populate named_groups in Match results

## Task 3: Populate Named Groups **Wave**: 1 (Critical Bug Fixes) **Category**: unspecified-high **Parent**: Epic #37 ### Problem Match.named_groups HashMap is always empty. Named groups are tracked in NFA but never propagated to Match results. ### What to do - RED: Write failing tests asserting Match.named_groups is populated - GREEN: Update engine to track named groups during NFA simulation and populate Match.named_groups - REFACTOR: Clean up group tracking code ### Acceptance Criteria - [ ] Match.named_groups contains entries for all named capture groups - [ ] Named group names are correct strings - [ ] Named group spans (start, end) are correct ### Files - `ogex/src/engine.rs:270-280` — Match construction (named_groups always empty) - `ogex/tests/compatibility_tests.rs:147` — TODO comment about named groups ### Commit `fix: populate named_groups in Match results`
Sign in to join this conversation.
No description provided.