spec: string-buffer primitive — make-string-buffer/append!/->string/length
OCaml: StringBuffer of Buffer.t in sx_types.ml; 5 primitives in sx_primitives.ml (make-string-buffer, string-buffer?, string-buffer-append!, string-buffer->string, string-buffer-length); inspect case added. JS: SxStringBuffer with array+join backend; _string_buffer marker for typeOf dispatch and dict? exclusion (also excludes _vector from dict?). spec/primitives.sx: 5 define-primitive entries. 17/17 tests pass on both OCaml and JS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -798,4 +798,10 @@
|
||||
:returns "list"
|
||||
:doc "Parse SX source string into a list of AST expressions.")
|
||||
|
||||
(define-primitive
|
||||
"make-string-buffer"
|
||||
:params ()
|
||||
:returns "string-buffer"
|
||||
:doc "Create a new empty mutable string buffer for O(1) amortised append.")
|
||||
|
||||
(define-module :stdlib.coroutines)
|
||||
|
||||
Reference in New Issue
Block a user