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>
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
(defcomp
|
|
(&key items)
|
|
(div
|
|
(~tw :tokens "mt-8")
|
|
(h2
|
|
(~tw
|
|
:tokens "text-lg font-semibold text-stone-700 border-b border-stone-200 pb-1 mb-3")
|
|
"Platform Interface")
|
|
(p
|
|
(~tw :tokens "text-sm text-stone-500 mb-3")
|
|
"Functions the host platform must provide.")
|
|
(div
|
|
(~tw :tokens "overflow-x-auto rounded border border-stone-200")
|
|
(table
|
|
(~tw :tokens "w-full text-left text-sm")
|
|
(thead
|
|
(tr
|
|
(~tw :tokens "border-b border-stone-200 bg-stone-50")
|
|
(th (~tw :tokens "px-3 py-2 font-medium text-stone-600") "Name")
|
|
(th (~tw :tokens "px-3 py-2 font-medium text-stone-600") "Params")
|
|
(th
|
|
(~tw :tokens "px-3 py-2 font-medium text-stone-600")
|
|
"Returns")
|
|
(th
|
|
(~tw :tokens "px-3 py-2 font-medium text-stone-600")
|
|
"Description")))
|
|
(tbody
|
|
(map
|
|
(fn
|
|
(item)
|
|
(let-match
|
|
{:doc doc :params params :returns returns :name name}
|
|
item
|
|
(tr
|
|
(~tw :tokens "border-b border-stone-100")
|
|
(td
|
|
(~tw :tokens "px-3 py-2 font-mono text-sm text-violet-700")
|
|
name)
|
|
(td
|
|
(~tw :tokens "px-3 py-2 font-mono text-xs text-stone-500")
|
|
params)
|
|
(td
|
|
(~tw :tokens "px-3 py-2 font-mono text-xs text-stone-500")
|
|
returns)
|
|
(td (~tw :tokens "px-3 py-2 text-stone-600") doc))))
|
|
items))))))
|