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>
This commit is contained in:
@@ -741,10 +741,6 @@
|
||||
|
||||
(define sx-nav-tree {:href "/sx/" :children (list {:href "/sx/(geography)" :children (list {:href "/sx/(geography.(reactive))" :children reactive-islands-nav-items :label "Reactive Islands"} {:href "/sx/(geography.(hypermedia))" :children (list {:href "/sx/(geography.(hypermedia.(reference)))" :children reference-nav-items :label "Reference"} {:href "/sx/(geography.(hypermedia.(example)))" :children examples-nav-items :label "Examples"}) :label "Hypermedia Lakes"} {:href "/sx/(geography.(scopes))" :summary "The unified primitive beneath provide, collect!, spreads, and islands. Named scope with downward value, upward accumulation, and a dedup flag." :label "Scopes"} {:href "/sx/(geography.(provide))" :summary "Sugar for scope-with-value. Render-time dynamic scope — the substrate beneath spreads, CSSX, and script collection." :label "Provide / Emit!"} {:href "/sx/(geography.(spreads))" :summary "Child-to-parent communication across render boundaries — spread, collect!, reactive-spread, built on scopes." :label "Spreads"} {:href "/sx/(geography.(marshes))" :children marshes-examples-nav-items :summary "Where reactivity and hypermedia interpenetrate — server writes to signals, reactive transforms reshape server content, client state modifies how hypermedia is interpreted." :label "Marshes"} {:href "/sx/(geography.(isomorphism))" :children isomorphism-nav-items :label "Isomorphism"} {:href "/sx/(geography.(cek))" :children cek-nav-items :label "CEK Machine"}) :label "Geography"} {:href "/sx/(language)" :children (list {:href "/sx/(language.(doc))" :children docs-nav-items :label "Docs"} {:href "/sx/(language.(spec))" :children specs-nav-items :label "Specs"} {:href "/sx/(language.(spec.(explore.evaluator)))" :label "Spec Explorer"} {:href "/sx/(language.(bootstrapper))" :children bootstrappers-nav-items :label "Bootstrappers"} {:href "/sx/(language.(test))" :children testing-nav-items :label "Testing"}) :label "Language"} {:href "/sx/(applications)" :children (list {:href "/sx/(applications.(sx-urls))" :label "SX URLs"} {:href "/sx/(applications.(cssx))" :children cssx-nav-items :label "CSSX"} {:href "/sx/(applications.(protocol))" :children protocols-nav-items :label "Protocols"} {:href "/sx/(applications.(sx-pub))" :label "sx-pub"} {:href "/sx/(applications.(sx-tools))" :label "SX Tools"} {:href "/sx/(geography.(reactive-runtime))" :children reactive-runtime-nav-items :label "Reactive Runtime"}) :label "Applications"} {:href "/sx/(etc)" :children (list {:href "/sx/(etc.(essay))" :children essays-nav-items :label "Essays"} {:href "/sx/(etc.(philosophy))" :children philosophy-nav-items :label "Philosophy"} {:href "/sx/(etc.(plan))" :children plans-nav-items :label "Plans"}) :label "Etc"}) :label "sx"})
|
||||
|
||||
(let
|
||||
((apps (nth (get sx-nav-tree "children") 2)) (hs-entry {:href "/sx/(applications.(hyperscript))" :label "_hyperscript"}))
|
||||
(dict-set! apps "children" (append (get apps "children") (list hs-entry))))
|
||||
|
||||
(define
|
||||
has-descendant-href?
|
||||
(fn
|
||||
@@ -818,12 +814,38 @@
|
||||
|
||||
(define
|
||||
hyperscript-nav-items
|
||||
(list (dict :label "_hyperscript" :href "/sx/(applications.(hyperscript))")))
|
||||
(list
|
||||
(dict :label "_hyperscript" :href "/sx/(applications.(hyperscript))")
|
||||
(dict :label "htmx.sx" :href "/sx/(applications.(hyperscript.htmx))")))
|
||||
|
||||
(define
|
||||
sxtp-nav-items
|
||||
(list (dict :label "SXTP Protocol" :href "/sx/(applications.(sxtp))")))
|
||||
|
||||
(define
|
||||
graphql-nav-items
|
||||
(list (dict :label "GraphQL" :href "/sx/(applications.(graphql))")))
|
||||
|
||||
(define
|
||||
pretext-nav-items
|
||||
(list (dict :label "Pretext" :href "/sx/(applications.(pretext))")))
|
||||
|
||||
(define
|
||||
htmx-nav-items
|
||||
(list
|
||||
(dict :label "Demo" :href "/sx/(applications.(htmx))")
|
||||
(dict :label "Reference" :href "/sx/(applications.(hyperscript.htmx))")))
|
||||
|
||||
(let
|
||||
((apps (nth (get sx-nav-tree "children") 2))
|
||||
(htmx-entry {:href "/sx/(applications.(htmx))" :children htmx-nav-items :label "htmx"})
|
||||
(hs-entry {:href "/sx/(applications.(hyperscript))" :label "_hyperscript"})
|
||||
(sxtp-entry {:href "/sx/(applications.(sxtp))" :children sxtp-nav-items :label "SXTP"})
|
||||
(pretext-entry {:href "/sx/(applications.(pretext))" :children pretext-nav-items :label "Pretext"})
|
||||
(gql-entry {:href "/sx/(applications.(graphql))" :children graphql-nav-items :label "GraphQL" :page-fn "graphql"}))
|
||||
(dict-set!
|
||||
apps
|
||||
"children"
|
||||
(append
|
||||
(get apps "children")
|
||||
(list htmx-entry hs-entry sxtp-entry pretext-entry gql-entry))))
|
||||
|
||||
Reference in New Issue
Block a user