Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

scan_int_tokens line/col fields are untested

已关闭 适合新手
#1,693 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@facelessdevhack 已经在做这个了。

开始于 2026年10月15日。

  • #1794 来自 @facelessdevhack —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
c
领域
testing-qa

调研方向

从 src/builtins.c 中 scan_int_tokens 内的 token_line 和 token_col 计数器开始,然后阅读 tests/test_string_math.eigs 中的 SIT1-SIT12 代码块,了解现有的断言风格。为跳过注释行之后的一个 token 和一个缩进的 token 添加 line 和 col 断言,沿用已删除的 ST3/ST4/ST6/ST7 检查的写法。完成标准是:测试在当前代码上通过,并且在刻意将 token_col 偏移一位时失败。

由索引模型根据 Issue 内容生成。

描述

area:stdlib found-by:critic kind:gate-defect

Found by the blind critic on #1677 round 4. This predates #1677 and is not caused by it.

scan_int_tokens computes each row's line (index 1) and col (index 2) with its own counter loop in src/builtins.c (token_line / token_col). That code is separate from the removed scan_tokens. No test asserts those two fields. tests/test_string_math.eigs SIT1-SIT12 check the text, is_int, the value and the offset slice, but not line or col. The ST1-ST8 line/col checks only ever exercised scan_tokens, and #1677 deleted them along with it.

Done when

  • tests/test_string_math.eigs asserts line and col for at least one token after a skipped comment line and one indented token, mirroring the old ST3/ST4/ST6/ST7.
  • A planted off-by-one in token_col makes the test fail.
主要语言
C
星标
3
派生
7
平均合并
11 小时 30 分钟
30 天内合并 PR
271

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

InauguralSystems/EigenScript 的其他 Issue

查看 InauguralSystems/EigenScript 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。