aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package/loader/invalid_package_exception.rs
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
commit7061051e19dc0ccbbdb694f030aedb05802287e4 (patch)
tree50865f241ee5837312c80b1d007b21319b70950a /crates/shirabe/src/package/loader/invalid_package_exception.rs
parenta01330572b985007acae339817d171a6505bb16b (diff)
downloadphp-shirabe-7061051e19dc0ccbbdb694f030aedb05802287e4.tar.gz
php-shirabe-7061051e19dc0ccbbdb694f030aedb05802287e4.tar.zst
php-shirabe-7061051e19dc0ccbbdb694f030aedb05802287e4.zip
refactor(preg): anchor A patterns at the call site
The shim carried the PCRE A (anchored) modifier alongside every compiled pattern so preg_match2 could honour it by searching the sub-slice at the offset. Only two call sites ever passed such a pattern, and each can cut that slice itself, so the flag is gone from the cache, ResolvedPattern, PregPattern and the php_regex! macro, and a pattern still carrying A is now rejected rather than silently searched unanchored. StringInput::tokenize and PhpFileCleaner::match search from their cursor with a `^`-prefixed pattern instead. The rule is written down in docs/dev/regex-porting.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/package/loader/invalid_package_exception.rs')
0 files changed, 0 insertions, 0 deletions