Files
rose-ash/sx/sx/docs/special-form-card.sx
giles 4f02f82f4e HS parser: fix number+comparison keyword collision, eval-hs uses hs-compile
Parser: skip unit suffix when next ident is a comparison keyword
(starts, ends, contains, matches, is, does, in, precedes, follows).
Fixes "123 starts with '12'" returning "123starts" instead of true.

eval-hs: use hs-compile directly instead of hs-to-sx-from-source with
"return " prefix, which was causing the parser to consume the comparison
as a string suffix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 11:29:01 +00:00

33 lines
1.0 KiB
Plaintext

(defcomp
(&key
(name :as string)
(syntax :as string)
(doc :as string)
(tail-position :as string)
(example :as string))
(div
(~tw :tokens "not-prose border border-stone-200 rounded-lg p-4 space-y-3")
(div
(~tw :tokens "flex items-baseline gap-3")
(code (~tw :tokens "text-lg font-bold text-violet-700") name)
(when
(not (= tail-position "none"))
(span
(~tw :tokens "text-xs px-2 py-0.5 rounded-full bg-green-100 text-green-700")
"TCO")))
(when
(not (= syntax ""))
(pre
(~tw :tokens "bg-stone-100 rounded px-3 py-2 text-sm font-mono text-stone-700 overflow-x-auto")
syntax))
(p (~tw :tokens "text-stone-600 text-sm whitespace-pre-line") doc)
(when
(not (= tail-position ""))
(p
(~tw :tokens "text-xs text-stone-500")
(span (~tw :tokens "font-semibold") "Tail position: ")
tail-position))
(when
(not (= example ""))
(~docs/code :src (highlight example "lisp")))))