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:
@@ -520,9 +520,27 @@
|
||||
(match-kw "with")
|
||||
(list (quote ends-with?) left (parse-expr))))
|
||||
((and (= typ "keyword") (= val "matches"))
|
||||
(do (adv!) (list (quote matches?) left (parse-expr))))
|
||||
(do
|
||||
(adv!)
|
||||
(let
|
||||
((right (parse-expr)))
|
||||
(if
|
||||
(match-kw "ignoring")
|
||||
(do
|
||||
(match-kw "case")
|
||||
(list (quote matches-ignore-case?) left right))
|
||||
(list (quote matches?) left right)))))
|
||||
((and (= typ "keyword") (= val "contains"))
|
||||
(do (adv!) (list (quote contains?) left (parse-expr))))
|
||||
(do
|
||||
(adv!)
|
||||
(let
|
||||
((right (parse-expr)))
|
||||
(if
|
||||
(match-kw "ignoring")
|
||||
(do
|
||||
(match-kw "case")
|
||||
(list (quote contains-ignore-case?) left right))
|
||||
(list (quote contains?) left right)))))
|
||||
((and (= typ "keyword") (= val "as"))
|
||||
(do
|
||||
(adv!)
|
||||
|
||||
Reference in New Issue
Block a user