Hyperscript: precedes/follows comparisons, tokenizer keywords
Parser: precedes/follows comparison operators in parse-cmp. Tokenizer: precedes, follows, ignoring, case keywords. Runtime: precedes?, follows? string comparison functions. 372/831 (45%) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -415,6 +415,10 @@
|
||||
(hs-contains? (rest collection) item)))))
|
||||
(true false))))
|
||||
;; Method dispatch — obj.method(args)
|
||||
(define precedes? (fn (a b) (< (str a) (str b))))
|
||||
|
||||
;; ── 0.9.90 features ─────────────────────────────────────────────
|
||||
;; beep! — debug logging, returns value unchanged
|
||||
(define
|
||||
hs-empty?
|
||||
(fn
|
||||
@@ -425,13 +429,11 @@
|
||||
((list? v) (= (len v) 0))
|
||||
((dict? v) (= (len (keys v)) 0))
|
||||
(true false))))
|
||||
|
||||
;; ── 0.9.90 features ─────────────────────────────────────────────
|
||||
;; beep! — debug logging, returns value unchanged
|
||||
(define hs-first (fn (lst) (first lst)))
|
||||
;; Property-based is — check obj.key truthiness
|
||||
(define hs-last (fn (lst) (last lst)))
|
||||
(define hs-first (fn (lst) (first lst)))
|
||||
;; Array slicing (inclusive both ends)
|
||||
(define hs-last (fn (lst) (last lst)))
|
||||
;; Collection: sorted by
|
||||
(define
|
||||
hs-template
|
||||
(fn
|
||||
@@ -517,7 +519,7 @@
|
||||
(set! i (+ i 1))
|
||||
(tpl-loop)))))))
|
||||
(do (tpl-loop) result))))
|
||||
;; Collection: sorted by
|
||||
;; Collection: sorted by descending
|
||||
(define
|
||||
hs-make-object
|
||||
(fn
|
||||
@@ -529,7 +531,7 @@
|
||||
(fn (pair) (dict-set! d (first pair) (nth pair 1)))
|
||||
pairs)
|
||||
d))))
|
||||
;; Collection: sorted by descending
|
||||
;; Collection: split by
|
||||
(define
|
||||
hs-method-call
|
||||
(fn
|
||||
@@ -552,9 +554,9 @@
|
||||
(if (= (first lst) item) i (idx-loop (rest lst) (+ i 1))))))
|
||||
(idx-loop obj 0)))
|
||||
(true nil))))
|
||||
;; Collection: split by
|
||||
(define hs-beep (fn (v) v))
|
||||
;; Collection: joined by
|
||||
(define hs-beep (fn (v) v))
|
||||
|
||||
(define hs-prop-is (fn (obj key) (not (hs-falsy? (host-get obj key)))))
|
||||
|
||||
(define
|
||||
|
||||
Reference in New Issue
Block a user