HS: remove .class from .coll when it matches .filter
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 19s

Parser produces remove-class-when AST node; compiler emits
filter + for-each pattern matching add-class-when.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-27 02:48:27 +00:00
parent c4d9efc8c4
commit eef2bfdd89
4 changed files with 80 additions and 12 deletions

View File

@@ -1133,12 +1133,17 @@
(collect-classes!)
(let
((tgt (if (match-kw "from") (parse-expr) (list (quote beingTold)))))
(if
(empty? extra-classes)
(list (quote remove-class) cls tgt)
(cons
(quote multi-remove-class)
(cons tgt (cons cls extra-classes)))))))
(let
((when-clause (if (match-kw "when") (parse-expr) nil)))
(if
(empty? extra-classes)
(if
when-clause
(list (quote remove-class-when) cls tgt when-clause)
(list (quote remove-class) cls tgt))
(cons
(quote multi-remove-class)
(cons tgt (cons cls extra-classes))))))))
((= (tp-type) "attr")
(let
((attr-name (get (adv!) "value")))