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>
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
(defcomp
|
|
(&key source python javascript z3)
|
|
(when
|
|
(not (= source ""))
|
|
(div
|
|
(~tw :tokens "mt-3 border border-stone-200 rounded-lg overflow-hidden")
|
|
(details
|
|
(summary
|
|
(~tw :tokens "px-3 py-1.5 bg-stone-50 text-xs font-medium text-stone-600 cursor-pointer select-none")
|
|
"SX Source")
|
|
(pre
|
|
(~tw :tokens "text-xs p-3 overflow-x-auto bg-white")
|
|
(code (~tw :tokens "language-sx") source)))
|
|
(when
|
|
python
|
|
(details
|
|
(summary
|
|
(~tw :tokens "px-3 py-1.5 bg-stone-50 text-xs font-medium text-stone-600 cursor-pointer border-t border-stone-200")
|
|
"Python")
|
|
(pre
|
|
(~tw :tokens "text-xs p-3 overflow-x-auto bg-white")
|
|
(code (highlight python "python")))))
|
|
(when
|
|
javascript
|
|
(details
|
|
(summary
|
|
(~tw :tokens "px-3 py-1.5 bg-stone-50 text-xs font-medium text-stone-600 cursor-pointer border-t border-stone-200")
|
|
"JavaScript")
|
|
(pre
|
|
(~tw :tokens "text-xs p-3 overflow-x-auto bg-white")
|
|
(code (highlight javascript "javascript")))))
|
|
(when
|
|
z3
|
|
(details
|
|
(summary
|
|
(~tw :tokens "px-3 py-1.5 bg-stone-50 text-xs font-medium text-stone-600 cursor-pointer border-t border-stone-200")
|
|
"Z3 / SMT-LIB")
|
|
(pre
|
|
(~tw :tokens "text-xs p-3 overflow-x-auto bg-white")
|
|
(code (highlight z3 "lisp"))))))))
|