fix(encoder): build empty inline tree

all toml-tests passing!
This commit is contained in:
hylo 2022-12-30 17:53:13 +01:00
parent 612e23e9ad
commit 476672a212
1 changed files with 4 additions and 2 deletions

View File

@ -192,7 +192,8 @@
;; ((toml-number? scm) (toml-build-number scm port))
;; ((symbol? scm) (toml-build-string (symbol->string scm) port))
((vector? scm) (toml-build-array scm port))
((string? scm) (toml-build-string scm port)))
((string? scm) (toml-build-string scm port))
(else (display scm port)))
(build-newline port newline?))))
@ -204,7 +205,8 @@
;; ((boolean? scm) (toml-build-boolean scm port))
;; ((toml-number? scm) (toml-build-number scm port))
;; ((symbol? scm) (toml-build-string (symbol->string scm) port))
((null? scm) '())
((null? scm)
(and inline? (toml-build-inline-tree '() port)))
(((value?) scm)
((toml-build-value) scm port #:newline? newline? #:inline? inline?))
((array-table? (and (list? scm) (cdr scm)))