aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-18 01:57:02 +0900
committernsfisis <nsfisis@gmail.com>2026-08-18 01:57:02 +0900
commit6aeda8b237fcbf7a56ca0e8c0fff415477d31d22 (patch)
tree13942695ae0e7c749cfcdb12d5824daf7134c008 /crates/shirabe/src/repository
parentfed0a6e7ac361af9b963c1f62411b1a85478230c (diff)
downloadphp-shirabe-6aeda8b237fcbf7a56ca0e8c0fff415477d31d22.tar.gz
php-shirabe-6aeda8b237fcbf7a56ca0e8c0fff415477d31d22.tar.zst
php-shirabe-6aeda8b237fcbf7a56ca0e8c0fff415477d31d22.zip
refactor(preg): make preg_match_all yield matches per occurrence
PHP's PREG_PATTERN_ORDER is column-oriented, but 7 of the 10 call sites read it row-wise, rebuilding each occurrence by indexing every column at the same offset. Return an iterator of PregMatches instead, which is also what the set-order and offset-capture variants were carrying, so the three functions collapse into one and PregMatchesAll, PregMatchesAllWithOffsets, CaptureKey and preg_match_map! all go away. The offset-capture call sites are served by the new PregMatches get_offset/name_offset accessors. The search stays eager: regex::Captures borrows only the subject, so the matches outlive the pattern resolved for the call, and PHP's preg_match_all is eager too. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository')
0 files changed, 0 insertions, 0 deletions