fix stray commas and add comment packing
Some checks failed
Sex CI / build-linux (pull_request) Failing after 3m1s
Sex CI / build-macos (pull_request) Has been cancelled

This commit is contained in:
2026-09-15 13:50:28 +03:00
parent fa4ad5acee
commit 7e6e32488b
3 changed files with 72 additions and 8 deletions

View File

@@ -42,5 +42,10 @@
(test '(%. a_b c) (walk-expr '(dot-access a-b c)))
;; comment -> %comment directive (rendered as /* ... */)
(test '(%comment " hi") (walk-expr '(comment " hi")))
(test '(%comment " hi") (process-toplevel-form '(comment " hi"))))
;; The reader eats only the `;' that introduced the line, so ";;; Foo"
;; arrives as ";; Foo"; and c-comment puts nothing between /* */ and
;; the text. Both are handled on the way out.
(test '(%comment " hi ") (walk-expr '(comment " hi")))
(test '(%comment " hi ") (process-toplevel-form '(comment " hi")))
(test '(%comment " Foo ") (walk-expr '(comment ";; Foo")))
(test '(%comment " Foo ") (walk-expr '(comment ";;; Foo "))))