[1113] 将 herk_to_utf8 与 utf8_to_herk 迁移到 lolly#3815
Open
da-liii wants to merge 6 commits into
Open
Conversation
更新 devel/1113.md,记录 herk_to_utf8/utf8_to_herk 迁移到 lolly/lolly/data 以及对应 glue 从 glue_moebius 迁移到 glue_lolly 的计划与验证命令。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 在 lolly/lolly/data/herk.hpp 与 herk.cpp 中实现 lolly::data::herk_to_utf8 与 lolly::data::utf8_to_herk,使用硬编码映射表。 - src/Data/String/converter.cpp 保留为对 lolly::data 的薄封装。 - 将 Scheme glue 从 glue_moebius.lua 迁移到 glue_lolly.lua。 - 在 init_glue_l2.cpp 中 include <lolly/data/herk.hpp>。 - 新增 lolly/tests/lolly/data/herk_test.cpp。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
将 herk_test.cpp 中的查表实现相关测试改为基于显式 UTF-8 字节序列与往返转换的朴素用例。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
按字节分组(herk_0x .. herk_Fx),用显式 Unicode 字符 直接描述 herk_to_utf8 的期望输出;对 invisible 或易混淆 字符保留 \\xHH 转义,并补充 escape、named escape 与未映射 字符的用例。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
按 Unicode 码点范围分组(0x..Fx 与 high mapped/unmapped), 用显式 UTF-8 字节序列直接描述 utf8_to_herk 的期望输出; 覆盖 0x00..0xFF 全部码点、所有高位映射及常见未映射字符。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
改用 lolly::data::utf8_to_herk / lolly::data::herk_to_utf8 直接调用。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
将
herk_to_utf8与utf8_to_herk的实现从src/Data/String/converter.cpp迁移到lolly/lolly/data/herk.cpp,并把对应的 Scheme glue 从glue_moebius.lua迁移到glue_lolly.lua。主要改动
lolly/lolly/data/herk.hpp/herk.cpp,在lolly::data命名空间中提供herk_to_utf8与utf8_to_herk。src/Data/String/converter.cpp删除重复映射表与实现,保留为对lolly::data的薄封装,现有 C++ 调用点无需修改。src/Scheme/L2/glue_lolly.lua增加utf8->herk、herk->utf8绑定到lolly::data函数。src/Scheme/L3/glue_moebius.lua移除对应的 glue 条目。src/Scheme/L2/init_glue_l2.cpp增加#include <lolly/data/herk.hpp>。lolly/tests/lolly/data/herk_test.cpp,覆盖 Herk/UTF-8 双向转换、转义序列、CJK 与边界情况。devel/1113.md任务文档。测试计划
xmake b lolly_tests && xmake test lolly_tests/herk_test通过xmake b converter_test && xmake r converter_test通过(6/6)xmake b stem构建成功gf fmt无变更🤖 Generated with Claude Code