Skip to content

[0046] 修复 gf fmt 将 quasiquote 内注释输出为 (*comment*)#794

Merged
da-liii merged 2 commits into
mainfrom
da/0046/fmt
May 17, 2026
Merged

[0046] 修复 gf fmt 将 quasiquote 内注释输出为 (*comment*)#794
da-liii merged 2 commits into
mainfrom
da/0046/fmt

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented May 17, 2026

Summary

修复 gf fmt 在格式化 quasiquote/quote 内的 ;; 注释时,将注释错误输出为 (*comment* \"...\") 代码的问题。

Changes

  • tools/fmt/liii/goldfmt-format.scm
    • 添加 comment-datum? 谓词,识别 (*comment* \"...\") 形式
    • format-reader-datum-inlineformat-reader-datum-at 中还原 ;; 注释
    • 更新 reader-datum-contains-newline-marker? 以识别注释节点
  • tools/fmt/tests/liii/goldfmt-format/format-string-test.scm:添加回归测试
  • devel/0046.md:添加开发文档

Test Plan

  • gf fmt --dry-run 不再输出 *comment*
  • tools/fmt 下全部 609 个 checks 通过

@da-liii da-liii merged commit 731de65 into main May 17, 2026
4 checks passed
@da-liii da-liii deleted the da/0046/fmt branch May 17, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant