HS: contains/matches ignoring case support — 425→426

- Parser: contains/matches with ignoring case modifier
- Compiler: contains-ignore-case? → hs-contains-ignore-case?
- Compiler: matches-ignore-case? → hs-matches-ignore-case?
- Runtime: downcase-based case-insensitive contains/matches

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-13 09:45:57 +00:00
parent c05d8788c7
commit 4cac08d56f
7 changed files with 72 additions and 20 deletions

View File

@@ -688,11 +688,21 @@
(quote hs-matches?)
(hs-to-sx (nth ast 1))
(hs-to-sx (nth ast 2))))
((= head (quote matches-ignore-case?))
(list
(quote hs-matches-ignore-case?)
(hs-to-sx (nth ast 1))
(hs-to-sx (nth ast 2))))
((= head (quote contains?))
(list
(quote hs-contains?)
(hs-to-sx (nth ast 1))
(hs-to-sx (nth ast 2))))
((= head (quote contains-ignore-case?))
(list
(quote hs-contains-ignore-case?)
(hs-to-sx (nth ast 1))
(hs-to-sx (nth ast 2))))
((= head (quote as))
(list (quote hs-coerce) (hs-to-sx (nth ast 1)) (nth ast 2)))
((= head (quote in?))