Conversation
Owner
Author
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.
合法 JSONC 在尾随逗号后插入行注释或块注释时,原单次扫描只能跳过空白,留下逗号而导致解析失败。
先移除注释,再在字符串之外识别尾随逗号;用空格替换逗号以保留错误列号。同时确保空对象/数组中的孤立逗号、重复逗号和未闭合注释仍被拒绝。
验证:存储层 12 项测试、OpenCode adapter 13 项测试通过;新增 10 个输入样例覆盖对象、数组、嵌套、多注释、CRLF、字符串内相似字符及非法输入。rustfmt 和 git diff --check 通过。
范围:清单 A02,独立基于 main,与 #6 的 OpenCode .json 解析格式修复分开。Windows 原生端到端尚未验证。
用户已批准本批 PR 使用 GitHub 连接器默认提交身份;上传 tree 与已验证本地提交一致。