Fix examples.sx: paren balance + dict eval crash at startup

1. Extra closing paren in ex-tabs handler
2. tab-content dict values contained (div ...) HTML tags which crash
   during register_components since HTML primitives aren't in env

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-12 01:30:21 +00:00
parent c23d0888ea
commit 17c58a2b5b
10 changed files with 110 additions and 1103 deletions

View File

@@ -70,6 +70,17 @@
:doc "Modulo a % b."
:body (native-mod a b))
(define-primitive "random-int"
:params ((low :as number) (high :as number))
:returns "number"
:doc "Random integer in [low, high] inclusive."
:body (native-random-int low high))
(define-primitive "json-encode"
:params (value)
:returns "string"
:doc "Encode value as JSON string with indentation.")
(define-primitive "sqrt"
:params ((x :as number))
:returns "number"